Share via


CReplicationClientError.Project Property

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

Gets or sets the name of the Commerce Server Staging (CSS) project associated with the CSS error.

object Project { set; get; }

Return Value

A string that contains the name of the project.

Remarks

You must have CSS administrator or operator rights to get or set this property.

The CReplicationClientError.Project property corresponds to the COM property named ReplicationClientError.Project.

Example

The following example tries to delete a file. If any errors occur, it displays the project name (Project1) and the error codes.

CReplicationClient replicationClient = new CReplicationClient();
replicationClient.Initialize("Project1");
try
{
    replicationClient.DeleteFile(@"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("Project: {0}", ((CReplicationClientError)errors[i]).get_Project());
            Console.WriteLine("Error: {0}", ((CReplicationClientError)errors[i]).get_ErrorCode());
        }
    }
}

See Also

Other Resources

CReplicationClient.GetExtendedErrorInfo Method

CReplicationClientError Class