powered by
Utility function to check if a caught condition is a typed climate error.
is_climate_error(error)
TRUE if the error inherits from "climate_error", FALSE otherwise.
A condition object
# \donttest{ tryCatch({ stop("example error") }, error = function(e) { if (is_climate_error(e)) { # Handle structured error } else { # Handle untyped error } }) # }
Run the code above in your browser using DataLab