================================================================== pub/Smalltalk/gnu_st/exceptions/CATALOG-CARD ================================================================== NAME Exeptions AUTHOR mckelvey@eso.mc.xerox.com FUNCTION Ability to raise exceptions and define handlers for them ST-VERSIONS GNU 1.1.1 PREREQUISITES None THEN FILE IN CONFLICTS WITH DISTRIBUTION world VERSION ID 1.0 VERSION DATE 26 Apr 95 SUMMARY This directory contains the Smalltalk source Exceptions.st and documentation in Exceptions.txt which describes the usage. The classes in Exceptions.st provide a mechanism to create an exception object, called an ExceptionEvent. Raising an exception is done by send the raise or raiseWith: message to an ExceptionEvent instance. A raised exception may be handled in an exception block, which is created by the following expression: ExceptionEvent on: exceptionEvent1 handle: handler1 { on: exceptionEvent2 handle: handler2 } { on: exceptionEvent3 handle: handler3 } { on: exceptionEvent4 handle: handler4 } { onAnyOther: otherHandler } do: aBlock where the selectors enclosed in { } are optional. First, aBlock is invoked with no arguments. If it sends raise or raiseWith: to the ExceptionEvent exceptionEvent1, the block handler1 is invoked with one argument, an ExceptionValue. If exceptionEvent2 is raised, handler2 is invoked, and so on. If an ExceptionEvent is raised other than those listed in an on:handle: pair, the handler otherHandler is invoked, passing the ExceptionValue argument. For more details, see the documentation in Exceptions.txt. Curt McKelvey - 4-26-95