Indy 9 | Content | Index | Reference

EIdSocketError
Hierarchy, Properties, Methods, See Also, Unit: IdException
Exception raised for Socket errors.

    EIdSocketError = class(EIdException)

Unit
IdException
Description
EIdSocketError is an EIdException descendant that represents an exception class raised when a general socket error occurs. EIdSocketError is used to represent non-protocol specific socket errors that originate from the protocol stack, and provides the LastError property to reflect the numeric error number.

EIdSocketError.LastError
EIdSocketError
Indicates the last error code.

    property LastError: Integer;

Description
LastError is the last socket error code and is used to provide the developer with flexibility when dealing with specific socket errors. This is set with the CreateError constructor.

The values for this property are usually listed in Winsock references such as:

- http://www.ibiblio.org/winsock/winsock-1.1/winsock.html

- http://www.sockets.com/

- Microsoft Windows Sockets 2 Reference (http://www.msdn.microsoft.com)

EIdSocketError.CreateError
EIdSocketError, See Also
Constructor for the exception class.

    constructor CreateError(const AErr: Integer; const AMsg: string); virtual;

Parameters
const AErr: Integer
Error number for the exception.
const AMsg: string
Error message for the exception.
Description
CreateError is the constructor for the exception instance, and allocates an instance of EIdSocketError with an error code specified by AErr and the message specified by AMsg.

CreateError calls the inherited Create method using AMsg as the exception message. CreateError also sets the value in LastError to the value specified in AErr.

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