CReplicationClient.GetExtendedErrorInfo Method

For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.

Retrieves any available error information about a CReplicationClient object.

Note

This method and the CReplicationClient object are used only to stage individual files. You cannot use this method to stage projects.

Object GetExtendedErrorInfo()

Return Value

An array of CReplicationClientError objects, up to one per destination server.

Remarks

You must have Commerce Server Staging (CSS) administrator or operator rights on the project to call this method.

The GetExtendedErrorInfo method returns only errors that are associated with replication destinations. It does not return other errors, such as invalid parameter errors or object initialization errors.

If the previous CReplicationClient method or property statement was successful, this method returns an empty array.

The CReplicationClient.GetExtendedErrorInfo method corresponds to the COM method named ReplicationClient.GetExtendedErrorInfo.

Example

The following example provides an error subroutine that you can call when you encounter an error condition following a call to a CReplicationClient method.

CReplicationClient replicationClient = new CReplicationClient();
// ....
object[] errors = (object[])replicationClient.GetExtendedErrorInfo();
// If the ClientError array is not empty, loop through it and display each error
if (errors.Length > 0)
{
    Console.WriteLine("The following errors were received: ");
    for (int i = 0; i < errors.Length; i++)
    {
        Console.WriteLine(((CReplicationClientError)errors[i]).get_ErrorCode());
    }
}

See Also

Other Resources

CReplicationClientError Class

CReplicationClient Class