Share via


TaskExtensions.ThrowIfFaulted Method (Task, Action)

Throws an exception if the task faulted.

Namespace:  Microsoft.WindowsAzure.MediaServices.Client
Assembly:  Microsoft.WindowsAzure.MediaServices.Client (in Microsoft.WindowsAzure.MediaServices.Client.dll)

Syntax

'Declaration
<ExtensionAttribute> _
Public Shared Sub ThrowIfFaulted ( _
    task As Task, _
    faultedCallback As Action _
)
'Usage
Dim task As Task 
Dim faultedCallback As Action 

task.ThrowIfFaulted(faultedCallback)
public static void ThrowIfFaulted(
    this Task task,
    Action faultedCallback
)
[ExtensionAttribute]
public:
static void ThrowIfFaulted(
    Task^ task, 
    Action^ faultedCallback
)
static member ThrowIfFaulted : 
        task:Task * 
        faultedCallback:Action -> unit
public static function ThrowIfFaulted(
    task : Task, 
    faultedCallback : Action
)

Parameters

Usage 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 https://msdn.microsoft.com/en-us/library/bb384936(v=azure.100) or https://msdn.microsoft.com/en-us/library/bb383977(v=azure.100).

See Also

Reference

TaskExtensions Class

ThrowIfFaulted Overload

Microsoft.WindowsAzure.MediaServices.Client Namespace