<body><div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000">
                                        Hi Tony!<div><br></div><div>Thank you for caring for Squeak's promises! :-D</div><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 04.06.2020 22:01:23 schrieb commits@source.squeak.org <commits@source.squeak.org>:</p><div style="font-family:Arial,Helvetica,sans-serif">Tony Garnock-Jones uploaded a new version of Kernel to project The Trunk:<br>http://source.squeak.org/trunk/Kernel-tonyg.1331.mcz<br><br>==================== Summary ====================<br><br>Name: Kernel-tonyg.1331<br>Author: tonyg<br>Time: 4 June 2020, 7:51:24.268037 pm<br>UUID: b7790e35-7fff-4def-89ef-2a6f8534ca20<br>Ancestors: Kernel-tonyg.1330<br><br>More repairs to Promise to bring it closer to Promise/A+ behaviour.<br><br>=============== Diff against Kernel-tonyg.1330 ===============<br><br>Item was changed:<br>  ----- Method: Promise>>ifRejected: (in category 'monad') -----<br>  ifRejected: errBlock<br>+   ^ self then: nil ifRejected: errBlock!<br>-       ^ self then: [:ignored | "Do nothing"] ifRejected: errBlock.!<br><br>Item was changed:<br>  ----- Method: Promise>>then: (in category 'monad') -----<br>  then: resolvedBlock<br>+        ^ self then: resolvedBlock ifRejected: nil!<br>-  ^ self then: resolvedBlock ifRejected: [:e | "Pass rejection reason along" e].!<br><br>Item was changed:<br>  ----- Method: Promise>>then:ifRejected: (in category 'monad') -----<br>  then: resolvedBlock ifRejected: errBlock<br>       "Return a Promise that, if it resolves, runs the resolvedBlock. If resolution throws an Exception, it runs the errBlock."<br>   | p |<br>         p := Promise new.<br>+    resolvedBlock<br>+                ifNil: [self whenResolved: [:v | p resolveWith: v]]<br>+          ifNotNil: [<br>+                  self whenResolved: [:v |<br>+                             [p resolveWith: (resolvedBlock value: v)]<br>+                                    on: Error do: [:e | p rejectWith: e]]].<br>+      errBlock<br>+             ifNil: [self whenRejected: [:e | p rejectWith: e]]<br>+           ifNotNil: [<br>+                  self whenRejected: [:e |<br>+                             [p resolveWith: (errBlock value: e)]<br>+                                         on: Error do: [:e2 | p rejectWith: e2]]].<br>-    self whenResolved: [:v |<br>-             [p resolveWith: (resolvedBlock value: v)]<br>-                    on: Error do: [:e | p rejectWith: e]].<br>-       self whenRejected: [:e |<br>-             [p resolveWith: (errBlock value: e)]<br>-                         on: Error do: [:e2 | p rejectWith: e2]].<br>      ^ p.!<br><br><br></div></blockquote>
                                        </div></body>