Skip to content

Read the failure metadata of a condition

Source: R/failure.R ยท Help: ?condition_failure

condition_failure() returns the recovery metadata carried by a dataexcept error, or by a condition read back from an envelope that had a failure record. Conditions dataexcept did not classify -- a base R simpleError, an rlang error, or a third-party exception in an envelope -- return NULL.

Usage

condition_failure(cnd)

is_retryable(cnd)

Arguments

cnd
A condition object.

Value

condition_failure() returns a dataexcept_failure_metadata object or NULL. is_retryable() returns TRUE, FALSE or NA.

Details

is_retryable() is the common question: TRUE or FALSE when the failure is classified, NA when it is not.

Examples

condition_failure(validation_error("age", -1))
is_retryable(validation_error("age", -1))
is_retryable(simpleError("boom"))