private async Task HandleErrorsAsync(IExecutionStrategy strategy, Func <Exception, ICakeContext, Task> errorHandler, Exception exception, ICakeContext context) { try { await strategy.HandleErrorsAsync(errorHandler, exception, context); } catch (Exception errorHandlerException) { if (errorHandlerException != exception) { _log.Error("Error: {0}", exception.Message); } throw; } }
/// <summary> /// Executes the error handler. /// </summary> /// <param name="action">The action.</param> /// <param name="exception">The exception.</param> /// <param name="context">The context.</param> public Task HandleErrorsAsync(Func <Exception, ICakeContext, Task> action, Exception exception, ICakeContext context) { return(_default.HandleErrorsAsync(action, exception, context)); }