Errors, raise and catch signals: Difference between revisions
Jump to navigation
Jump to search
(imported material) |
(No difference)
|
Latest revision as of 21:28, 4 May 2025
- This page collects a few snippets I find useful to pick up this topic
- You make an error object like this:
Error new messageText: 'fooerr'
- For the Error to generate an 'error signal' you do
Error new messageText: 'fooerr' ; signal
- You can define your own errors subclassing
Error
and maybe adding a defaultmessageText
andtag
. - Example of catching a risen Error signal
[ Error new messageText: 'fooerr' ; signal ] on: Error do: [ Transcript log: 'foobar'. ].