Learn R Programming

box (version 1.0.0)

rethrow: Pretty-print error call to be informative for the user.

Description

Pretty-print error call to be informative for the user.

Usage

rethrow(error, call = sys.call(sys.parent()))

rethrow_on_error(expr, call = sys.call(sys.parent()))

Arguments

error

an object of class c("error", "condition") to rethrow

call

the calling context to rethrow the error from, overwriting the error<U+2019>s current call object

expr

an expression to evaluate inside tryCatch

Value

If it does not throw an error, rethrow_on_error returns the value of evaluating expr.