Skip to content

TransferErrorDescription - cClientWebService

Returns an error description for the last transfer

Type: Function
Return Data Type: String

Syntax

Function TransferErrorDescription Returns String

Call Example

Get TransferErrorDescription to StringVariable

Description

The peTransferStatus property is set after a web-service call. If a transfer error occured (the value is not wssOK), the text for that error may be determined by calling the TransferErrorDescription.

Set pbSuppressLastError of of oWSCustomerService to false
Get wsCustomerName of oWSCustomerService to sName
Get peTransferStatus of oWSCustomerService to eTransferStatus
If (eTransferStatus=wssOK) begin
    Send AddNewName sName
end
else Begin
     // handle soap fault errors in a special way. Report all others as errors
    If (eTransferStatus=wssSoapFault) begin
        Get TransferErrorDescription of oWSCustomerService to sErr
        Send WeHadAFaultError sErr
    end
    else begin
        Send LastError of oWSCustomerService // this will generate an error
    end
end

See Also

psFaultCode | psFaultString | pbSuppressLastError | peTransferStatus | LastError

Return Value

A string containing the description for the last error