A class for representing a failed or stopped computation
Failure.Rd
See also
Success()
, which wraps a value to provide the context of a successful computation.
Examples
Failure("The computation failed")
#> <resultr::Failure>
#> @ error: chr "The computation failed"
Failure("Argument x must be numeric")
#> <resultr::Failure>
#> @ error: chr "Argument x must be numeric"
Failure(rlang::catch_cnd(stop("An error was thrown")))
#> <resultr::Failure>
#> @ error:List of 2
#> .. $ message: chr "An error was thrown"
#> .. $ call : language force(expr)
#> .. - attr(*, "class")= chr [1:3] "simpleError" "error" "condition"