powered by
Handle errors and warnings.
e(obj)w(obj)
w(obj)
A character string or an object of class error, or warning.
error
warning
# NOT RUN { err <- e("Something went wrong") foo <- function(x){ if(is.character(x)) return(err) log(x) } foo("a") # }
Run the code above in your browser using DataLab