Category:Smalltalk: Difference between revisions

Line 531:
Smalltalk supports proceedable exceptions.
 
<lang smalltalk>[ try block to be evaluated ] on: exception do:[:ex | handler code ]</lang>
thewhere 'exexception' argumentis toan Exception class or Signal instance and the hander'ex' argument provides detail information (where and why) to the hander and also allows control of how to continue after the handlerafterwards (proceed, return, restart, reject).
<br>The handler basically has the following options:
* ex return - return out of the try block
Anonymous user