[squeak-dev] The Inbox: Kernel-nice.1391.mcz

Jaromir Matas m at jaromir.net
Sun May 2 13:18:13 UTC 2021


I'd like to return to my original proposal above in
There was a bug in #outer that confused me and I withdrew the proposal. The
bug has been fixed and the original proposal in my opinion makes sense again
- to unify how the two kinds of exception return are implemented.
Theoretically it's possible to change #return definition in the future and
then the two returns would diverge.

The proposed change is in

Context>>handleSignal: (in category 'private-exceptions') -----
  handleSignal: exception
  "Sent to handler (on:do:) contexts only.
  Execute the handler action block"
  | val |
  <primitive: 199>  "just a marker, fail and execute the following"
  exception privHandlerContext: self contextTag.
  self deactivateHandler. "Prevent re-entering the action block, unless it
is explicitely rearmed"
  val := [self fireHandlerActionForSignal: exception] ensure: [self
+ exception return: val  "return from exception handlerContext if not
otherwise directed in handle block"!
- self return: val  "return from self if not otherwise directed in handle

^[^ Jaromir
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

More information about the Squeak-dev mailing list