cnd_type: What type is a condition?

View source: R/cnd.R

cnd_typeR Documentation

What type is a condition?

Description

Use cnd_type() to check what type a condition is.

Usage

cnd_type(cnd)

Arguments

cnd

A condition object.

Value

A string, either "condition", "message", "warning", "error" or "interrupt".

Examples

cnd_type(catch_cnd(abort("Abort!")))
cnd_type(catch_cnd(interrupt()))

r-lib/rlang documentation built on June 2, 2024, 12:30 p.m.