R: What type is a condition?

cnd_type {rlang} | R 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()))

[Package rlang version 0.4.3 Index]