R/cnd.R
cnd_type.Rd
Use cnd_type() to check what type a condition is.
cnd_type()
cnd_type(cnd)
A condition object.
A string, either "condition", "message", "warning", "error" or "interrupt".
"condition"
"message"
"warning"
"error"
"interrupt"
cnd_type(catch_cnd(abort("Abort!"))) #> [1] "error" cnd_type(catch_cnd(interrupt())) #> [1] "interrupt"