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

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


Hi

I'd like to return to my original proposal above in
http://forum.world.st/The-Inbox-Kernel-nice-1391-mcz-tp5129040p5129084.html.
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
http://forum.world.st/The-Inbox-Kernel-jar-1399-mcz-td5129370.html:

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
reactivateHandler].
+ 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
block"!



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


More information about the Squeak-dev mailing list