Crate unwrap_or_else_error_handle

Crate unwrap_or_else_error_handle 

Source

Functions§

handle_error
Function to handle errors in a way that prints a message and exits the program. result.unwrap_or_else(handle_error(“An error occurred”)) Prints “An error occurred: ” and exits on error.