tryCatch({
tcwarn({ NULL = 1 },'Cannot assign to NULL','variable')
},
warning = function(e) print( e )
)
tryCatch({
tcwarn({ as.numeric('abc') },'Issue in as.numeric()')
},
warning = function(e) print( e )
)
Run the code above in your browser using DataLab