[This is preliminary documentation and is subject to change.]
Registers action executed if task was faulted or cancelled
Namespace: NFXAssembly: NFX (in NFX.dll) Version: 3.0.0.1 (3.0.0.1)
public static Task OnError(
this Task task,
Action handler
)
public static Task OnError(
this Task task,
Action handler
)
<ExtensionAttribute>
Public Shared Function OnError (
task As Task,
handler As Action
) As Task
<ExtensionAttribute>
Public Shared Function OnError (
task As Task,
handler As Action
) As Task
public:
[ExtensionAttribute]
static Task^ OnError(
Task^ task,
Action^ handler
)
public:
[ExtensionAttribute]
static Task^ OnError(
Task^ task,
Action^ handler
)
static member OnError :
task : Task *
handler : Action -> Task
static member OnError :
task : Task *
handler : Action -> Task
Return Value
Type:
TaskUsage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Task. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).