<div dir="ltr">Hi.<div><br></div><div>Now that I'm not confused, the real question.</div><div><br></div><div>Would it be worthwhile to move this method to the instance side, especially if we expect more Project classes?  Then, if say NuScratch's error handling is significantly different the standard MorphicProject, it could decide to try any other MorphicProject parent it finds.</div><div><br></div><div>Also, will this code fail if the project is a MorphicProject, and the parent is an AniMorphicProject (since MorphicProject isn't a kindOf AniMorphicProject)?  Maybe not fail - it would just chain into another pass through the code, but still unnecessary.</div><div><br></div><div>Thanks,</div><div>cbc</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 2, 2017 at 6:22 AM,  <span dir="ltr"><<a href="mailto:commits@source.squeak.org" target="_blank">commits@source.squeak.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">David T. Lewis uploaded a new version of System to project The Trunk:<br>
<a href="http://source.squeak.org/trunk/System-dtl.961.mcz" rel="noreferrer" target="_blank">http://source.squeak.org/trunk<wbr>/System-dtl.961.mcz</a><br>
<br>
==================== Summary ====================<br>
<br>
Name: System-dtl.961<br>
Author: dtl<br>
Time: 2 August 2017, 9:22:02.611529 am<br>
UUID: 4485dae2-bb1b-48ca-bdc1-5f1f4d<wbr>d89eb0<br>
Ancestors: System-eem.960<br>
<br>
When Project class>>tryOtherProjectForRecov<wbr>ery is searching for a safe project to use for emergency recovery, test for projects of a type that the current project inherits from, but do not require that they be of the same class. This handles the case of errors in a FooMorphicProject that inherits from MorphicProject, for which another Morphic project is not likely to be suitable for handling a fatal error raised in the FooMorphicProject.<br>
<br>
Expected behavior when evaluating "Project handlePrimitiveError: 'Foobar' "<br>
<br>
In an MVC project that is a chlid of a Morphic project, enter the Mophic project and open a debugger on the process that failed in MVC.<br>
<br>
In a Mophic project that is a chlid of an MVC project, enter the MVC project and open a debugger on the process that failed in Morphic.<br>
<br>
For the common case of a parent project of the same type as the project from which the error is raised, do not attempt to enter another project, and open an emergency evaluator instead.<br>
<br>
=============== Diff against System-eem.960 ===============<br>
<br>
Item was changed:<br>
  ----- Method: Project class>>tryOtherProjectForRecov<wbr>ery: (in category 'error recovery') -----<br>
  tryOtherProjectForRecovery: errorMessage<br>
        "Try entering the parent project if it uses a different user interface. We determine this by comparing the project's class."<br>
<br>
        | safeProject nextProject |<br>
        nextProject := Project current.<br>
        safeProject := nil.<br>
        [safeProject notNil or: [nextProject isTopProject]] whileFalse: [<br>
                nextProject := nextProject parent.<br>
+               (Project current isKindOf: nextProject class)<br>
-               nextProject class == Project current class<br>
                        ifFalse: [safeProject := nextProject]].<br>
        safeProject ifNotNil: [:p |<br>
                p enterForEmergencyRecovery.<br>
                "Active process will usually suspend after this."].!<br>
<br>
<br>
</blockquote></div><br></div></div>