Function notify_on_error

Source
fn notify_on_error<T>(result: Result<T>, options: &WatchOptions) -> Result<T>
Expand description

Callback wrapper that sends errors as notifications.

This helper implements the common pattern of converting errors to notifications and sending them:

ⓘ
let result = some_operation();
notify_on_error(result, &options)?;