Category:Smalltalk: Difference between revisions

Content added Content deleted
Line 542: Line 542:


<lang smalltalk>[ try block to be evaluated ] on:exception do:[:ex | handler code ]</lang>
<lang smalltalk>[ try block to be evaluated ] on:exception do:[:ex | handler code ]</lang>
where 'exception' is an Exception class or Signal instance and the 'ex' argument provides detail information (where and why) to the hander and also allows control of how to continue afterwards (proceed, return, restart, reject).
where '<I>exception</I>' is an Exception class or Signal instance and the '<I>ex</I>' argument provides detail information (where and why) to the hander and also allows control of how to continue afterwards (proceed, return, restart, reject).
<br>The handler basically has the following options:
<br>The handler basically has the following options:
* ex return - return out of the try block
* ex return - return out of the try block