condition wercker status codecov.io

R doesn’t come with a built-in constructor function for conditions, but we can easily add one.

(Advanced R, by Hadley Wickham)

Actually, there is simpleCondition(), simpleError() and the like, but they don't allow specifying an additional class. The functions in this package allow it:

library(condition)
cond <- new_error("Something went wrong", class = "oops")
cond
is.error(cond)

See the vignette for additional details.



krlmlr/condition documentation built on May 20, 2019, 6:16 p.m.