<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That example nicely demonstrates the semantics difference between Abandon and Terminate in Debugger :)</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Expected output:<br>
<br>
    outer1<br>
    (debugger appears; click 'abandon')<br>
    inner<br>
<br>
or:<br>
<br>
    outer1<br>
    (debugger appears; click 'terminate')<br>
    inner<br>
    outer2<br>
<br>
</span></p>
<p class="MsoNormal">best,</p>
<p class="MsoNormal">Jaromir</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:marcel.taeumel@hpi.de">Marcel Taeumel</a><br>
<b>Sent: </b>Thursday, July 7, 2022 18:09<br>
<b>To: </b><a href="mailto:squeak-dev@lists.squeakfoundation.org">squeak-dev</a><br>
<b>Subject: </b>Re: [squeak-dev] `ensure:` ... doesn't (in some circumstances involving nesting `ensure:` blocks in `ensure:` handlers).</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Hi Tony --<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Seems to work now. Except that you will also get MNU #stepToCallee after abandon.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Best,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Marcel<o:p></o:p></span></p>
</div>
<blockquote style="border:none;border-left:solid windowtext 1.0pt;padding:0in 0in 0in 8.0pt;margin-left:0in;margin-top:15.0pt;margin-bottom:5.0pt">
<p style="margin-top:7.5pt"><span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#AAAAAA">Am 04.11.2021 10:56:48 schrieb Tony Garnock-Jones <tonyg@leastfixedpoint.com>:<o:p></o:p></span></p>
</blockquote>
<p class="MsoNormal" style="mso-margin-top-alt:0in;margin-right:.5in;margin-bottom:12.0pt;margin-left:0in">
<span style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black">Also of note: using `self halt` to debug `ensure:` blocks is made
<br>
difficult by this! (Because the process just... disappears!)<br>
<br>
On 11/4/21 09:59, Tony Garnock-Jones wrote:<br>
> Here's an example of where `ensure:` doesn't quite do what it says on <br>
> the tin:<br>
> <br>
>     [<br>
>       [Processor activeProcess terminate] ensure: [<br>
>         Transcript cr; show: 'outer1'.<br>
>         [nil error: 'aiee'] ensure: [Transcript cr; show: 'inner'].<br>
>         Transcript cr; show: 'outer2'.<br>
>       ]<br>
>     ] fork<br>
> <br>
> Expected output:<br>
> <br>
>     outer1<br>
>     (debugger appears; click 'abandon')<br>
>     inner<br>
> <br>
> (or possibly:<br>
> <br>
>     outer1<br>
>     (debugger appears; click 'abandon')<br>
>     inner<br>
>     outer2<br>
> <br>
> which is what you get if you change "Processor activeProcess terminate" <br>
> to "1 + 2" above... but this also seems odd.)<br>
> <br>
> Actual output:<br>
> <br>
>     outer1<br>
>     (no debugger appears, nothing more happens)<br>
> <br>
> Are my expectations out-of-line, or is there a problem worth <br>
> investigating here?<br>
> <br>
> "--"<br>
> <br>
> I think it's worth noting that a related program:<br>
> <br>
>     [<br>
>       [Processor activeProcess terminate] ensure: [<br>
>         [<br>
>           Transcript cr; show: 'outer1'.<br>
>           [nil error: 'aiee'] ensure: [<br>
>             Transcript cr; show: 'inner'].<br>
>           Transcript cr; show: 'outer2'.<br>
>         ] on: Error do: [:ex | Transcript cr; show: ex]<br>
>       ]<br>
>     ] fork<br>
> <br>
> yields the reasonable output<br>
> <br>
>     outer1<br>
>     Error: aiee<br>
>     inner<br>
> <br>
> Cheers,<br>
>   Tony<br>
> <o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>