tryCatch(
assert_all_are_true(FALSE),
error = function(e)
{
if(inherits(e, "assertionCondition"))
{
# Handle assertions
message("This is an assertion condition.")
} else
{
# Handle other error types
}
}
)
Run the code above in your browser using DataLab