Maturity Index: Experimental
To raise an exception, use:
To install a handler to catch an exception, use the Block message:[[Exception new] signal];
The argument of the exception handler (the do: Block) is the instance of the Exception class that received the signal message.[{ ... } on:Exception do: { :anException | ... }];
+signalThis is a shortcut for:
[[self new] signal]
+signal:(STR)messageThis is a shortcut for:
[[self new] signal:message]
-freeOverridden to dispose attributes.
-signalThe message evaluates the handler that is installed to deal with this class of exceptions.
Note: If no handler is set, this message currently sends a halt: message with the messageText as argument.
-signal:(STR)messageLike signal, but first sets the message text to message.
-messageTextThis method returns the descriptive text that was associated to the exception instance.
- (STR)strEquivalent to :
[messageText str]
-messageText:messageAssociates a String attribute to the exception.
-str:(STR)messageEquivalent to messageText:.
-resignalAs:replacementExceptionSignal an alternative exception in place of the receiver.
-resumeReinstall the handler that was active at the time the exception was signalled.