/// <summary> /// Adds an handler action to be invoked if an exception is thrown while executing in this shell scope. /// </summary> public static ShellScope AddExceptionHandler(this ShellScope scope, Action <ShellScope, Exception> handler) { scope?.ExceptionHandler((scope, e) => { handler(scope, e); return(Task.CompletedTask); }); return(scope); }
/// <summary> /// Adds an handler task to be invoked if an exception is thrown while executing in this shell scope. /// </summary> public static ShellScope AddExceptionHandler(this ShellScope scope, Func <ShellScope, Exception, Task> handler) { scope?.ExceptionHandler(handler); return(scope); }