[squeak-dev] [Ann] System-PasswordManager

Julian Fitzell jfitzell at gmail.com
Mon Mar 23 23:27:09 UTC 2009


On Mon, Mar 23, 2009 at 9:00 PM, Michael van der Gulik <mikevdg at gmail.com>wrote:

>
> 2009/3/24 Vaidotas Didžbalis <vaidasd at gmail.com>
>> Thank you,
>> I have question about style:
>> in the code I see:
>>
>> boolean ifFalse:[^self error: 'Some error'].
>>
>> sould'nt it be like this:
>>
>> boolean ifFalse:[self error: 'Some error'].
>>
>> Since “self error:" is definitely expected to signal exception?
>>
>>
>
> You can validly continue execution from an error (unlike, for example,
> Java). Sometimes, I'd get an error, fix things up in the debugger and then
> continue execution.


Yes, Vaidotas, take a look at Exception>>isResumable. It's overridden on
Error to return false but can be overridden again by subclasses.

As long as an Exception is resumable, you can do the following:

[self doSomething]
  on: SomeError
  do: [ :error | error resume: 5 ]

And if I recall correctly the ANSI standard specifies that behaviour is
undefined when resuming a non-resumable Exception (!) so in some cases you
can do that too! :)

Julian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090324/018c2366/attachment.htm


More information about the Squeak-dev mailing list