Previous in Contents Next in Contents

ErrorCode Property

This property specifies the error code that the Content Deployment server sets when a method fails.

Syntax

ReplicationClientError.ErrorCode

Remarks

See Status Codes for a description of each error code.

Example

The following example initializes the project. If any errors occur during initialization, the example displays the error codes.

Option Explicit 
On Error Resume Next

dim Client
set Client = CreateObject("CrsApi.ReplicationClient")
Client.Initialize("Project1")
dim ClientError
if err.Number > 0 then
  set ClientError = Client.GetExtendedErrorInfo
end if
'If the ClientError array isn't empty, loop through it
'and display each error
dim NumElements = Ubound(ClientError)
if NumElements > 0 then
  redim preserve ClientError(NumElements)
  Wscript.Echo "The following errors were received:"
  dim i
  for i = 0 to NumElements
    Wscript.Echo "Error code: " & ClientError(i).ErrorCode
    Wscript.Echo "Description: " & ClientError(i).Description
  Next
end if
'Release objects
set ClientError = Nothing
set Client      = Nothing

See Also

ReplicationClient.GetExtendedErrorInfo


© 1997-2000 Microsoft Corporation. All rights reserved.