All Manuals > LispWorks® User Guide and Reference Manual > 32 The COMM Package

socket-error Generic Function

Summary

Signals an I/O error for a socket-stream.

Package

comm

Signature

socket-error stream error-code format-control &rest format-arguments

Method signatures

socket-error (stream socket-stream) (error-code t) (format-control t) &rest format-arguments

Arguments
stream
error-code
An integer.
format-control
A format control string.
format-arguments
Format arguments for format-control.
Description

The generic function socket-error is called by LispWorks when there is an I/O error in an operation on stream. The default method specialized on socket-stream signals an error of type socket-io-error.

error-code is the error code of the error, which is a value of errno on Unix-like systems or a Windows error code on Windows. format-control and format-arguments are used as in simple-condition to give some further information about the error.

Notes

socket-error existed in LispWorks version before 8.0, but was not documented.

In most cases, handling socket-io-error is the most convenient way to deal with socket I/O errors. Defining your own method for socket-error may be useful when you want to signal different condition types. To use it, you will have to define and use your own sub-class of socket-stream and specialize your method on this sub-class.


LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:26