Catch a condition
This is a small wrapper around tryCatch()
that captures any
condition signalled while evaluating its argument. It is useful for
situations where you expect a specific condition to be signalled,
for debugging, and for unit testing.
catch_cnd(expr, classes = "condition")
expr |
Expression to be evaluated with a catching condition handler. |
classes |
A character vector of condition classes to catch. By default, catches all conditions. |
A condition if any was signalled, NULL
otherwise.
catch_cnd(10) catch_cnd(abort("an error")) catch_cnd(signal("my_condition", message = "a condition"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.