<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 19, 2015 at 1:59 AM, Frank Shearar <span dir="ltr">&lt;<a href="mailto:frank.shearar@gmail.com" target="_blank">frank.shearar@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 17 January 2015 at 18:35, Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com">eliot.miranda@gmail.com</a>&gt; wrote:<br>
&gt; Hi Frank,<br>
&gt;<br>
&gt; On Jan 17, 2015, at 3:39 AM, Frank Shearar &lt;<a href="mailto:frank.shearar@gmail.com">frank.shearar@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;&gt; On 16 January 2015 at 21:44,  &lt;<a href="mailto:commits@source.squeak.org">commits@source.squeak.org</a>&gt; wrote:<br>
&gt;&gt;&gt; Chris Muller uploaded a new version of System to project The Trunk:<br>
&gt;&gt;&gt; <a href="http://source.squeak.org/trunk/System-cmm.694.mcz" target="_blank">http://source.squeak.org/trunk/System-cmm.694.mcz</a><br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; ==================== Summary ====================<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Name: System-cmm.694<br>
&gt;&gt;&gt; Author: cmm<br>
&gt;&gt;&gt; Time: 16 January 2015, 3:44:19.079 pm<br>
&gt;&gt;&gt; UUID: e79a2347-2f40-4fec-8f00-f67ecad68491<br>
&gt;&gt;&gt; Ancestors: System-dtl.693<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; - #flush stdout and stderr after writing error information to them.<br>
&gt;&gt;&gt; - After that, if the exception is resumable (i.e. a Warning), resume it.  Except if its a MessageNotUnderstood -- that is not an error you want to resume in a headless environment.<br>
&gt;&gt;<br>
&gt;&gt; Why? It&#39;s probably a rare use case for a #run: script to catch MNUs to<br>
&gt;&gt; do something fancy, I guess? Maybe it&#39;s because #run: is usually<br>
&gt;&gt; (always?) the top level of the program?<br>
&gt;<br>
&gt; One reason is that resuming an MNU simply resends from the diesNotUnderstand: method, so resuming will result in infinite recursion.  I suppose the handler could allow one repeat but that seems arbitrary.  There&#39;s nothing to stop one including a resuming MNU handler in the expression if one wants to override the default behaviour.<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt; Catching only MNUs seems very specific. Maybe there could be a #run:<br>
&gt;&gt; version that says &quot;and here&#39;s a function you can use to control which<br>
&gt;&gt; exceptions are OK to resume, and which not&quot;?<br>
&gt;<br>
&gt; Well there is Notification and Warning but (rightly) MessageNotUnderstood is an Error.  Reporting Notifications and Warnings to the output and continuing, but aborting for other exceptions seems the right thing to do, rather than basing it in resumability, yes?  What am I missing?<br>
&gt;<br>
&gt; Whether an exception is resumability or not is to do with whether one can usefully provide a value with which to continue, not to do with the severity of the error.<br>
<br>
</span>Chris has already addressed the issue, but to continue the<br>
conversation here, yes, an exception is resumable if e isResumable =<br>
true. That&#39;s exactly as it should be. But seeing as an MNU  is<br>
resumable, you could write a handler that _did_ return a value. In<br>
other words, the problem that I saw - and I think Chris and you agree?<br>
- is that it looks weird to resume some resumable exceptions but not<br>
others.<br></blockquote><div><br></div><div>I think we all agree on this.  There&#39;s no case for resuming anything other than Notification, Warning and subclasses.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree with the point you make in a later mail, that #run: should<br>
just bail noisily on a top-level exception.<br>
<br>
frank<br>
<span class=""><br>
&gt;  For example, being able to resume with nil for a permissions violation when opening a file or directory might make it really easy to implement a find(1) like search over directories where some may be unreadable due to permissions.  Being able to resume doesn&#39;t make the permissions violation any the less severe, but it dies give us a nice way if handling it, certainly less complex than having to explicitly check for permissions during the traversal.  Likewise, being able to substitute a value for an MNU allows all sorts of conveniences, eg see my code for disassembling methods to bytecode messages.<br>
&gt;<br>
&gt; So IMO the system should be reporting Notifications and Warnings and aborting for anything else.<br>
<br>
</span>Yep.<br>
<br>
&gt;&gt; frank<br>
&gt;<br>
&gt; Eliot (phone)<br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>