In other languages there is the possibility to chain exception handlers like 
this:

`try { doOne(); doTwo(); doThree(); }`

`catch(ExceptionOne ex){`

`  handleOne();`

`}`

`catch(ExceptionTwo ex) {`

`  handleTwo();`

`}`

`catch(ExceptionThree ex) {`

`  handleThree();`

`}`

`catch(Exception ex) {`

`  handleRest();`

`}`

Is this possible in Pharo? I’ve tried

`[ block ]`

`  on: ExceptionOne do: [ handleOne ]`

`  on: ExceptionTwo do: [ handleTwo ]`

but it is invalid syntax.

Reply via email to