powered by
Equivalent to tryCatch().
tryCatch()
bash(expr, e = NULL, w = NULL)
Expression to run, passed to tryCatch().
An object of class Error or Warning as returned by e() or w().
Error
Warning
e()
w()
# NOT RUN { safe_log <- function(x){ result <- bash(log(x)) if(is.e(result)) stop(result$stop()) return(result) } if(interactive()) safe_log("a") # }
Run the code above in your browser using DataLab