Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

is.error

Is return value of try an exception?


Description

Checks if an object is of class “try-error” or “error”.

Usage

is.error(x)

Arguments

x

[any]
Any object, usually the return value of try, tryCatch, or a function which may return a simpleError.

Value

[logical(1)].

Examples

x = try(stop("foo"))
print(is.error(x))
x = 1
print(is.error(x))

BBmisc

Miscellaneous Helper Functions for B. Bischl

v1.11
BSD_2_clause + file LICENSE
Authors
Bernd Bischl [aut, cre], Michel Lang [aut], Jakob Bossek [aut], Daniel Horn [aut], Jakob Richter [aut], Dirk Surmann [aut]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.