Skip to content

LastError - cXmlHttpTransfer

Used to report an error after a failed xml http transfer

Type: Procedure

Syntax

Procedure LastError

Call Example

Send LastError

Description

If an xml/http request fails the return XML handle will be 0 and peXmlTransferStatus will contain a status code. Note that an error is not automatically generated. It is expected that you will want to check the peXmlTransferStatus after your request and handle any failures in your code. If you wish, you can send LastError to generate an error.

Calling LastError after a transfer will generate an error message explaining how the transfer failed. If no error occurred, LastError will do nothing.

Get HttpPostXmlNode of hoHttp "dataaccess.com" "MyApp/stuff.asp" hoSentXml to hoRcvdXml
If (hoRcvdXml=0) begin // if no data came back, probably and error
    Get peXmlTransferStatus of hoHttp to eStatus
    If (eStatus<>xtsOk) Begin       
        Send LastError of hoHttp 
    end
end

See Also

peXmlTransferStatus | TransferErrorDescription