[Cuis-dev] On the changes to detect method returns in exception handlers
Juan Vuletich
juan at jvuletich.org
Sat Oct 19 13:00:50 PDT 2019
On 10/17/2019 5:35 PM, Phil B wrote:
> Juan,
>
> On Thu, Oct 17, 2019 at 1:08 PM Juan Vuletich <juan at jvuletich.org
> <mailto:juan at jvuletich.org>> wrote:
>
> Hi Phil,
>
> On 10/17/2019 2:31 AM, Phil B wrote:
>>
>> My changes do two things. One is to avoid non local returns
>> in handler blocks. The other one is about a few places where
>> you did [ :exception | exception signal ] as the signal
>> handler. Exceptions can only be signaled once! I changed them
>> to do [ :exception | exception pass ]. This was breaking the
>> exception system if the recent changes were loaded.
>>
>>
>> 1) Would you be opposed to a #nonLocalReturn: method on
>> Exception? That seems to me a cleaner and clearer way of doing
>> this. It's also more consistent with how Exception deals with
>> the other scenarios.
>
> I think #nonLocalReturn: would be ok. Maybe a better name could be
> #methodReturn:
>
>
> Attached (along with exception recycling). This was too easy... what
> did I miss?
>
> Thanks,
> Phil
Hi Phil,
I just pushed a change that allows for exception recycling without an
explicit call. The signaling context is reset after handling.
The change set also adds a couple of preferences to control allowing of
non-local returns in handlers, and the warning shown in the Transcript.
Thanks,
--
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20191019/135eb333/attachment.htm>
More information about the Cuis-dev
mailing list