Errors 屬性
Gets a reference to the AdomdErrorCollection contained by the exception.
命名空間: Microsoft.AnalysisServices.AdomdClient
組件: Microsoft.AnalysisServices.AdomdClient (在 Microsoft.AnalysisServices.AdomdClient.dll 中)
語法
'宣告
Public ReadOnly Property Errors As AdomdErrorCollection
Get
'用途
Dim instance As AdomdErrorResponseException
Dim value As AdomdErrorCollection
value = instance.Errors
public AdomdErrorCollection Errors { get; }
public:
property AdomdErrorCollection^ Errors {
AdomdErrorCollection^ get ();
}
member Errors : AdomdErrorCollection
function get Errors () : AdomdErrorCollection
屬性值
型別: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: " & _
.Item(errorIndex).ErrorCode.ToString)
Debug.WriteLine(" Source: " & _
.Item(errorIndex).Source)
Debug.WriteLine(" Message: " & _
.Item(errorIndex).Message)
Debug.WriteLine(" HelpLink: " & _
.Item(errorIndex).HelpLink)
Next
End With
End Sub