<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Note Squeak's object events: #when:send:to:. There, "when" requires an event object as a look-up key in the event map. Usually a Symbol.<div><br></div><div>Best,</div><div>Marcel</div><div class="mb_sig"></div><blockquote class="history_container" type="cite" style="border-left-style:solid;border-width:1px; margin-top:20px; margin-left:0px;padding-left:10px;">
                        <p style="color: #AAAAAA; margin-top: 10px;">Am 03.01.2020 07:43:42 schrieb Jakob Reschke <forums.jakob@resfarm.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">
<div dir="auto"><div>Note that VA Smalltalk has a legacy approach to exceptions that precedes the ANSI standard. It uses #when:do: in place of #on:do:. (Nowadays it also supports #on:do: but not for old-style exceptions in applications.) Might not a blocker for the proposed nomenclature, but you should at least be aware of it.</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr"> <<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>> schrieb am Fr., 3. Jan. 2020, 02:21:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A new version of Kernel was added to project The Inbox:<br>
<a href="http://source.squeak.org/inbox/Kernel-ct.1292.mcz" rel="noreferrer noreferrer" target="_blank">http://source.squeak.org/inbox/Kernel-ct.1292.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: Kernel-ct.1292<br>
Author: ct<br>
Time: 3 January 2020, 2:21:26.297116 am<br>
UUID: 95936a10-85a4-734e-a10b-0f87290b70f9<br>
Ancestors: Kernel-nice.1291<br>
<br>
Proposal: Implement conditional exception handling on blocks. The nomenclature is inspired from usual practice in .NET languages.<br>
<br>
For an impression of possible users, have a look at:<br>
<br>
        self systemNavigation<br>
                browseMessageList: ((self systemNavigation allCallsOn: #on:do: and: #pass) intersection: (#(ifTrue: ifFalse: ifTrue:ifFalse: ifFalse:ifTrue:) gather: [:sel | self systemNavigation allCallsOn: sel]))<br>
                name: 'Potential users of #on:when:do:'<br>
<br>
=============== Diff against Kernel-nice.1291 ===============<br>
<br>
Item was added:<br>
+ ----- Method: BlockClosure>>on:when:do: (in category 'exceptions') -----<br>
+ on: exceptionOrExceptionSet when: aPredicate do: handlerAction<br>
+ <br>
+       ^ self<br>
+               on: exceptionOrExceptionSet<br>
+               do: [:exception |<br>
+                       (aPredicate value: exception)<br>
+                               ifTrue: [handlerAction cull: exception]<br>
+                               ifFalse: [exception pass]]!<br>
<br>
Item was added:<br>
+ ----- Method: BlockClosure>>on:when:ensure: (in category 'exceptions') -----<br>
+ on: exceptionOrExceptionSet when: aPredicate ensure: aBlock<br>
+ <br>
+       ^ self<br>
+               on: exceptionOrExceptionSet<br>
+               do: [:exception |<br>
+                       (aPredicate value: exception)<br>
+                               ifTrue: [aBlock value].<br>
+                       exception pass]!<br>
<br>
<br>
</blockquote></div></div></div>
</div></blockquote>
                                        </div></body>