Cocktail Help Reference
HandleError Method
See Also  Send Feedback
Cocktail.Compat Assembly > Cocktail Namespace > TaskExtensions Class : HandleError Method



task
Current task.
errorHandler
Action to be called if current tasks fails.

Glossary Item Box

Schedules an error handler to be called if the current task fails.

Syntax

Visual Basic (Declaration) 
<ExtensionAttribute()>
Public Shared Sub HandleError( _
   ByVal task As Task, _
   ByVal errorHandler As Action(Of Exception) _
) 
Visual Basic (Usage)Copy Code
Dim task As Task
Dim errorHandler As Action(Of Exception)
 
TaskExtensions.HandleError(task, errorHandler)
C# 
[ExtensionAttribute()]
public static void HandleError( 
   Task task,
   Action<Exception> errorHandler
)
C++/CLI 
[ExtensionAttribute()]
public:
static void HandleError( 
   Task^ task,
   Action<Exception^>^ errorHandler
) 

Parameters

task
Current task.
errorHandler
Action to be called if current tasks fails.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.