[Pharo-users] Re: Exception handler chaining

2023-05-25 Thread Richard Sargent
#, will do the trick. ExceptionOne, ExceptionTwo Nesting the #on:do: messages is probably the more correct approach, since each one would be catching just one family of exceptions and not require class testing. Unfortunately, nested #on:do: messages are terribly ugly. Many people (I hate that phra

[Pharo-users] Re: Exception handler chaining

2023-05-25 Thread James Foster via Pharo-users
Rather than ‘Array with:with:’ it probably should be ‘ExceptionSet with:with:’. > On May 25, 2023, at 9:19 AM, James Foster via Pharo-users > wrote: > > The #’on:do:’ implementation in Block accepts either an Exception or an > ExceptionSet as the first parameter. So you can do something like t

[Pharo-users] Re: Exception handler chaining

2023-05-25 Thread James Foster via Pharo-users
The #’on:do:’ implementation in Block accepts either an Exception or an ExceptionSet as the first parameter. So you can do something like the following (I’m typing from memory without trying so may have syntax errrors): [ “tryBlock” ] on: (Array with: ExceptionOne with: ExceptionTwo) do: [:ex |

[Pharo-users] [ANN] Mole v3.4.0 [v3.4.0] released!

2023-05-25 Thread Buenos Aires Smalltalk
Mole, a model for graphs, both directed and undirected. reached it's v3.4.0 version. What's Changed Add Pharo 11 support by @gcotelli in https://github.com/ba-st/Mole/pull/19 Full Changelog: https://github.com/ba-st/Mole/compare/v3.3.0…v3.4.0 Regards, The Buenos Aires Smalltalk team

[Pharo-users] [ANN] Ansible v2.1.0 [v2.1.0] released!

2023-05-25 Thread Buenos Aires Smalltalk
Ansible, an AMQP client for Pharo reached it's v2.1.0 version. What's Changed Add Pharo 11 support by @gcotelli in https://github.com/ba-st/Ansible/pull/42 Full Changelog: https://github.com/ba-st/Ansible/compare/v2.0.0…v2.1.0 Regards, The Buenos Aires Smalltalk team

[Pharo-users] Exception handler chaining

2023-05-25 Thread mlntdrv
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 e