[squeak-dev] The Inbox: Kernel-ct.1481.mcz
Jakob Reschke
jakres+squeak at gmail.com
Sun Jun 12 18:34:57 UTC 2022
self copy refreshContexts signal
I know that refreshContexts in its current implementation will explicitly
return self, but should we rely on this or not better use a cascade here?
self copy refreshContexts; signal
Am So., 12. Juni 2022 um 17:28 Uhr schrieb <commits at source.squeak.org>:
> A new version of Kernel was added to project The Inbox:
> http://source.squeak.org/inbox/Kernel-ct.1481.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-ct.1481
> Author: ct
> Time: 12 June 2022, 5:27:48.147094 pm
> UUID: 4fd2a361-2b3b-474c-9b86-3a899e25a8e0
> Ancestors: Kernel-ct.1480
>
> Revises Exception>>signal to copy all exception-specific state when
> resignaling an already signaled exception.
>
> Thanks to Jaromir (jar)!
>
> See:
> https://lists.squeakfoundation.org/pipermail/squeak-dev/2022-June/220989.html
>
> =============== Diff against Kernel-ct.1480 ===============
>
> Item was added:
> + ----- Method: Exception>>refreshContexts (in category 'copying') -----
> + refreshContexts
> +
> + signalContext := handlerContext := outerContext := nil.
> + !
>
> Item was changed:
> ----- Method: Exception>>signal (in category 'signaling') -----
> signal
> + "Ask handler contexts in the sender chain to handle this signal.
> The default is to evaluate my defaultAction and return the result.
> + Sending #signal to an already signaled exception generates a fresh
> copy of the receiver."
> +
> + signalContext ifNotNil: [^self copy refreshContexts signal].
> - "Ask ContextHandlers in the sender chain to handle this signal.
> The default is to execute and return my defaultAction.
> - Sending #signal to an already signaled exception generates a new
> exception of the same type with the same messageText"
> -
> - signalContext ifNotNil: [^self class signal: messageText].
> signalContext := thisContext contextTag.
> ^(thisContext nextHandlerContextForSignal: self) handleSignal:
> self!
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220612/0de83d41/attachment.html>
More information about the Squeak-dev
mailing list
|