[fpc-pascal] Socket error messages

Michael Van Canneyt michael at freepascal.org
Tue Sep 24 12:31:10 CEST 2013



On Tue, 24 Sep 2013, Mark Morgan Lloyd wrote:

>>> How does one convert from the numeric value returned by SocketError to the 
>>> name of the error (specifically, to e.g. EsockEINVAL rather than 
>>> EsysEINVAL, i.e. to be in line with the definition of functions like 
>>> fpbind)?
>
>> use the errors unit. (specific for unix)
>>
>> It has a functiun strerror()
>
> But aren't those EsysEINVAL rather than EsockEINVAL etc.?

They are the same values. Sockets existed before the unix unit.
All these values are simply the POSIX error codes.
(some special cases notwithstanding)

Michael.



More information about the fpc-pascal mailing list