Learn R Programming

lgr (version 0.2.0)

default_exception_handler: Demote an Exception to a Warning

Description

Throws a timestamped warning instead of stopping the program. This is the default exception handler used by Loggers.

Usage

default_exception_handler(e)

Arguments

e

a character scalar, usually a try-error as thrown by base::tryCatch()

Value

The warning as character vector

Examples

Run this code
# NOT RUN {
tryCatch(stop("an error has occurred"), error = default_exception_handler)

# }

Run the code above in your browser using DataLab