Learn R Programming

rlang (version 1.1.0)

cnd_type: What type is a condition?

Description

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

Usage

cnd_type(cnd)

Value

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

Arguments

cnd

A condition object.

Examples

Run this code
cnd_type(catch_cnd(abort("Abort!")))
cnd_type(catch_cnd(interrupt()))

Run the code above in your browser using DataLab