Learn R Programming

textAnnotatoR (version 1.0.1)

handle_error: Handle errors with custom messages

Description

Provides error handling with customizable success, error, and completion messages. Wraps expressions in a tryCatch block and displays appropriate notifications.

Provides error handling with customizable success, error, and completion messages. Wraps expressions in a tryCatch block and displays appropriate notifications.

Provides error handling with customizable success, error, and completion messages. Wraps expressions in a tryCatch block and displays appropriate notifications.

Usage

handle_error(expr, success_msg = NULL, error_msg = NULL, finally_msg = NULL)

handle_error(expr, success_msg = NULL, error_msg = NULL, finally_msg = NULL)

handle_error(expr, success_msg = NULL, error_msg = NULL, finally_msg = NULL)

Value

Result of the expression or NULL if error occurs

Result of the expression or NULL if error occurs

Result of the expression or NULL if error occurs

Arguments

expr

Expression to evaluate

success_msg

Optional character string for success notification

error_msg

Optional character string for error notification

finally_msg

Optional character string for completion notification