CakeTaskBuilderExtensions.

ReportError(CakeTaskBuilder, Func<Exception, Task>) Method

Summary

Adds an error reporter for the task to be executed when an exception is thrown from the task. This action is invoked before the error handler, but gives no opportunity to recover from the error.
Namespace
Cake.Core
Containing Type
CakeTaskBuilderExtensions

Syntax

public static CakeTaskBuilder ReportError(this CakeTaskBuilder builder, Func<Exception, Task> errorReporter)

Parameters

Name Type Description
builder CakeTaskBuilder The builder.
errorReporter Func<Exception, Task> The finally handler.

Return Value

Type Description
CakeTaskBuilder The same CakeTaskBuilder instance so that multiple calls can be chained.