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

rlang documentation built on June 22, 2024, 9:31 a.m.