The exception classes defined by Microsoft Lync 2010 API inherit from System . . :: . . Exception but do not provide additional members beyond the Exceptionmembers. Use the specific Lync 2010 API exception to indicate the error condition that generated an exception.

Exception Scenarios

The following exception scenarios are handled by specific exception classes. All Lync 2010 API exceptions inherit Microsoft.Lync.Model . . :: . . LyncClientException .

Microsoft Lync 2010 client platform exceptions:

  • The Microsoft.Lync.Model . . :: . . AlreadyInitializedException exception is raised when Lync 2010 has already been initialized. Normally, this exception is raised when a different process has initialized Lync 2010. You initialize Lync 2010 when LyncClient . . :: . . InSuppressedMode is true.

  • The Microsoft.Lync.Model . . :: . . NotInitializedException exception is thrown when you try to access Lync 2010 API and Lync 2010 is not initialized. Initialization is required when LyncClient . . :: . . InSuppressedMode is true.

  • The Microsoft.Lync.Model . . :: . . NotStartedByUserException exception is thrown when Lync 2010 is not available. Lync 2010 may not be running or running with user credentials while your custom application is running under administrator credentials.

Client State Exceptions

  • NotReadyException .

  • The NotSignedInException applies when the user is not signed in to Lync 2010.

Collection Exceptions

  • Microsoft.Lync.Model . . :: . . ItemAlreadyExistException is raised when you attempt to add a duplicate contact to a collection such as a Microsoft.Lync.Model.Group . . :: . . ContactCollection .

  • Microsoft.Lync.Model . . :: . . ItemNotFoundException is raised when you attempt to get an item out of a collection when it does not exist. Use a method such as GroupCollection . . :: . . TryGetGroup to get an item when the item may not be in the collection.

  • Microsoft.Lync.Model . . :: . . TypeMismatchException

Operation Exceptions

  • The Microsoft.Lync.Model . . :: . . RequestCanceledException exception is raised when attempting to cancel an operation that has already been canceled.

  • The Microsoft.Lync.Model . . :: . . ResultOverflowException exception is raised when a search operation returns more than the maximum specified search results.

  • The Microsoft.Lync.Model . . :: . . LyncClientException exception when an operation such as InstantMessageModality . . :: . . BeginSendMessage cannot be completed due to a remote conversation participant state change. You catch the exception when it is raised by InstantMessageModality . . :: . . EndSendMessage .

See Also