Summary
Adds an error handler to be executed if an exception occurs in the task.
- Namespace
- Cake
.Core - Containing Type
- Cake
Task Builder Extensions
Syntax
public static CakeTaskBuilder OnError(this CakeTaskBuilder builder, Func<Exception, ICakeContext, Task> errorHandler)
Parameters
Name | Type | Description |
---|---|---|
builder | CakeTaskBuilder | The builder. |
errorHandler | Func |
The error handler. |
Return Value
Type | Description |
---|---|
CakeTaskBuilder | The same CakeTaskBuilder instance so that multiple calls can be chained. |