Indy 9
EIdHTTPProtocolException
Hierarchy, Properties, Methods, Unit: IdHTTP
Exception raised during processing of a HTTP response.
EIdHTTPProtocolException = class(EIdProtocolReplyError)
Unit
IdHTTP
Description
EIdHTTPProtocolException is a EIdProtocolReplyError descendant that represents an exception type raised by the HTTP protocol handler during processing of an HTTP response. EIdHTTPProtocolException is generally raised when an unexpected numeric HTTP response code is received from the HTTP response.

EIdHTTPProtocolException reimplements the alternate constructor CreateError to facilitate creating an exception instance with the values specified in the arguments to the constructor.

EIdHTTPProtocolException also implements ErrorMessage to describe the text in the protocol error message.


EIdHTTPProtocolException.ErrorMessage
EIdHTTPProtocolException
Text for the HTTP protocol error response.
property ErrorMessage: string;
Description
ErrorMessage is a read-ony String property that represents the text portion of a protocol error received in a HTTP response. ErrorMessage is initalized using an argument in the CreateError constructor.

EIdHTTPProtocolException.CreateError
EIdHTTPProtocolException
Constructor for the exception instance.
constructor CreateError(const anErrCode: Integer; const asReplyMessage: string; const asErrorMessage: string); virtual; reintroduce;
Parameters
const anErrCode: Integer
Numeric error code from the HTTP response.
const asReplyMessage: string
General description of the error.
const asErrorMessage: string
Context specific text for the error message.
Description
CreateError is the constructor for the exception. CreateError calls the inherited CreateError method using the anErrCode and asReplyMessage parameters. CreateError also assigns the value in asErrorMessage to the ErrorMessage property prior to raising the exception.

Created with Doc-O-Matic 2 donated to Project JEDI. Commercial license available from the Doc-O-Matic site.