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