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()))

hadley/rlang documentation built on Dec. 17, 2024, 3:26 a.m.