handle_error {textAnnotatoR} | R Documentation |
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)
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 |
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