Re: [Pharo-users] catching exceptions

2015-11-26 Thread abdelghani ALIDRA
Hi Skip,  It is working fine for me Thank you.  Abdelghani De : Skip Lentz À : abdelghani ALIDRA ; Any question about pharo is welcome Envoyé le : Jeudi 26 novembre 2015 13h38 Objet : Re: [Pharo-users] catching exceptions Hi, you can use BlockClosure>>on:do:, lik

Re: [Pharo-users] catching exceptions

2015-11-26 Thread Skip Lentz
Hi, you can use BlockClosure>>on:do:, like this: [ #() atRandom ] on: Exception do: [ 1 ]. Personally, I would check the collection to be empty before calling. > On Nov 26, 2015, at 1:33 PM, abdelghani ALIDRA wrote: > > Hi everyBody, > > I know there is some kind of exceptions handling mechan

[Pharo-users] catching exceptions

2015-11-26 Thread abdelghani ALIDRA
Hi everyBody, I know there is some kind of exceptions handling mechanism  in Pharo but I cant  exactly  remember where to find it.Actually, I would like to execute specific code if atRandomis called on an empty Array or Collection.I probably can still override errorEmptyCollection but maybe there