Indy 9
EIdProtocolReplyError
Hierarchy, Properties, Methods, See Also, Unit: IdException
Exception type for protocol reply errors.
EIdProtocolReplyError = class(EIdException)
Unit
IdException
Description
EIdProtocolReplyError is an EIdException descendant tha represents the exception type raised for protocol replies that represent an error condition. EIdProtocolReplyError is also used as the ancestor for more specific protocol reply errors, like EIdHTTPProtocolException and EIdNNTPConnectionRefused.

EIdProtocolReplyError.ReplyErrorCode
EIdProtocolReplyError
Error code for the exception.
property ReplyErrorCode: Integer;
Description
ReplyErrorCode is the error code for the exception and can be used for testing selectively to certain errors in your program.

Some protocols such as IMAP4 and POP3 do not use numerical error number codes. In such cases, we define constant values in the classes unit, and override the GetResponse method to parse those replies and return the constants. When this is done, you use the constants as if they were numerical values. Examples are the following:

TIdIMAP4

  • wsOk - the operation succeeded

  • wsNo - the operation failed

  • wsBad - bad command

EIdProtocolReplyError.CreateError
EIdProtocolReplyError
Constructor for the exception.
constructor CreateError(const AErrCode: Integer; const AReplyMessage: string); virtual; reintroduce;
Parameters
anErrCode
Error number form the peer.
asReplyMessage
Error reply from the peer.
Description
CreateError is the constructor for the exception, and creates a EIdProtocolReplyError exception which takes the following parameters:

  • asReplyMessage - text reply from a peer.

  • anErrCode - error code from the peer.

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