Navigation:  Programming Cookbook > Sockets Connectivity >

Exceptions

Previous pageReturn to chapter overviewNext page

Error handling for Sockets is achieved through the standard Exception mechanism. The default outcome of an error is a walkback indicating an unhandled exception. Exceptions can be handled by closing the appropriate code in a block and using #on:do:. All Socket errors are subclassed from SocketError but a few of the more useful errors such as SocketClosed and SocketWaitCancelled are distinguished explicitly.

Tip: the SocketWouldBlock error class is provided for internal use only and is not intended to be explicitly trapped by user code.