CReplicationClientError.Description Property
For the latest version of Commerce Server 2007 Help, see the Microsoft Web site.
Gets or sets the textual description of a Commerce Server Staging (CSS) error.
object Description { set; get; }
Return Value
A string that contains a description of the error.
Remarks
The CReplicationClientError.Description property corresponds to the COM property named ReplicationClientError.Description.
Example
The following example tries to send a file for the project named Project1. If it fails, it displays the error codes and error descriptions that CSS returns.
CReplicationClient replicationClient = new CReplicationClient();
replicationClient.Initialize("Project1");
try
{
replicationClient.SendFile("myfile.htm");
}
catch (System.Runtime.InteropServices.COMException)
{
object[] errors = (object[])replicationClient.GetExtendedErrorInfo();
// If the ClientError array is not empty, loop through it and display each error
int numElements = errors.Length;
if (numElements > 0)
{
for (int i = 0; i < numElements; i++)
{
Console.WriteLine("Error code: {0}", ((CReplicationClientError)errors[i]).get_ErrorCode());
Console.WriteLine("Description code: {0}", ((CReplicationClientError)errors[i]).get_Description());
}
}
}