MSDN Library

AdomdErrorResponseException.Errors Property


Applies To: SQL Server 2016 Preview

Gets a reference to the AdomdErrorCollection contained by the exception.

Namespace:   Microsoft.AnalysisServices.AdomdClient
Assembly:  Microsoft.AnalysisServices.AdomdClient (in Microsoft.AnalysisServices.AdomdClient.dll)

public AdomdErrorCollection Errors { get; }

Property Value

Type: Microsoft.AnalysisServices.AdomdClient.AdomdErrorCollection

An AdomdErrorCollection that describes the series of errors that led to the exception. The collection contains one or more instances of AdomdError that encapsulate the errors received by the AdomdConnection.

The following subroutine iterates through the Errors collection of an AdomdErrorResponseException in reverse order (from earliest error to latest error), displaying the properties of each AdomdError in the collection:

Public Sub ListAdomdErrors(ByRef ExceptionToCheck As AdomdErrorResponseException)
    Dim errorCount As Integer = ExceptionToCheck.Errors.Count
    Dim errorIndex As Integer

    Debug.WriteLine("Found " & errorCount & _
        " error(s) in AdomdErrorResponseException:")

    With ExceptionToCheck.Errors
        For errorIndex = errorCount - 1 To 0 Step -1
            Debug.WriteLine("Error " & errorIndex & ":")
            Debug.WriteLine("  ErrorCode:  " & _
            Debug.WriteLine("  Source:     " & _
            Debug.WriteLine("  Message:    " & _
            Debug.WriteLine("  HelpLink:   " & _
    End With
End Sub
Return to top
© 2015 Microsoft