CakeTaskBuilderOfTExtensions.

ReportError<TData>(CakeTaskBuilder<TData>, Action<Exception>) 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
CakeTaskBuilderOfTExtensions

Syntax

public static CakeTaskBuilder<TData> ReportError<TData>(this CakeTaskBuilder<TData> builder, Action<Exception> errorReporter) 
    where TData : class

Type Parameters

Name Description
TData The extra data to operate with inside the error handler.

Parameters

Name Type Description
builder CakeTaskBuilder<TData> The builder.
errorReporter Action<Exception> The error report handler.

Return Value

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