Share via


ExceptionHandlingScope.StartTry Method

Initiates a code block that might throw server exceptions.

Namespace:  Microsoft.SharePoint.Client
Assemblies:   Microsoft.SharePoint.Client.Silverlight.Runtime (in Microsoft.SharePoint.Client.Silverlight.Runtime.dll);  Microsoft.SharePoint.Client.Runtime (in Microsoft.SharePoint.Client.Runtime.dll)

Syntax

'Declaration
Public Function StartTry As IDisposable
'Usage
Dim instance As ExceptionHandlingScope
Dim returnValue As IDisposable

returnValue = instance.StartTry()
public IDisposable StartTry()

Return Value

Type: System.IDisposable
The interface that is used to end the try scope.

Remarks

The try block must be the statement immediately after StartScope(), and it must have a corresponding StartCatch() block. Each exception-handling scope can have only one try block.

See Also

Reference

ExceptionHandlingScope Class

ExceptionHandlingScope Members

Microsoft.SharePoint.Client Namespace