Exceptions: Difference between revisions

Content added Content deleted
Line 1,673: Line 1,673:
: iwillCatch
: iwillCatch
| e |
| e |
try: e [ iwillThrowAnException ] when: [ System.Out "Exception catched : " << e << cr ]
try: e [ iwillThrowAnException ] when: [ "Exception catched :" . e .cr ]
try: e [ 1 2 over last ] when: [ System.Out "Exception catched : " << e << cr ]
try: e [ 1 2 over last ] when: [ "Exception catched :" . e .cr ]
"Done" println ;</lang>
"Done" println ;</lang>


Line 1,680: Line 1,680:
<pre>
<pre>
Exception catched : A new exception
Exception catched : A new exception
Exception catched : Integer <1> does not understand #last
Exception catched : 1 does not understand #last
Done
Done
</pre>
</pre>