Hi Chris,
enterForEmergencyRecovery is sent to the safeProject at the end of the method.
HTH, Jakob
2017-08-02 16:15 GMT+02:00 Chris Cunningham cunningham.cb@gmail.com:
Hi.
This message really confuses me (as does the previous version). It checks for a safe project - I get that. But then, after if finds the safe project, it stores it in a temporary variable and does nothing else with it? What magic actually causes Squeak to USE that safe project? I can't find it in this method, nor in the caller of this method (#handlePrimitiveError:).
Very confused, cbc
On Wed, Aug 2, 2017 at 6:22 AM, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-dtl.961.mcz
==================== Summary ====================
Name: System-dtl.961 Author: dtl Time: 2 August 2017, 9:22:02.611529 am UUID: 4485dae2-bb1b-48ca-bdc1-5f1f4dd89eb0 Ancestors: System-eem.960
When Project class>>tryOtherProjectForRecovery 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.
Expected behavior when evaluating "Project handlePrimitiveError: 'Foobar' "
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.
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.
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.
=============== Diff against System-eem.960 ===============
Item was changed: ----- Method: Project class>>tryOtherProjectForRecovery: (in category 'error recovery') ----- tryOtherProjectForRecovery: errorMessage "Try entering the parent project if it uses a different user interface. We determine this by comparing the project's class."
| safeProject nextProject | nextProject := Project current. safeProject := nil. [safeProject notNil or: [nextProject isTopProject]] whileFalse: [ nextProject := nextProject parent.
(Project current isKindOf: nextProject class)
nextProject class == Project current class ifFalse: [safeProject := nextProject]]. safeProject ifNotNil: [:p | p enterForEmergencyRecovery. "Active process will usually suspend after this."].!
Wow, staring me right in the face.
Thanks, that is clear - just missed it.
On Wed, Aug 2, 2017 at 7:18 AM, Jakob Reschke jakob.reschke@student.hpi.de wrote:
Hi Chris,
enterForEmergencyRecovery is sent to the safeProject at the end of the method.
HTH, Jakob
2017-08-02 16:15 GMT+02:00 Chris Cunningham cunningham.cb@gmail.com:
Hi.
This message really confuses me (as does the previous version). It
checks
for a safe project - I get that. But then, after if finds the safe project, it stores it in a temporary variable and does nothing else with it? What magic actually causes Squeak to USE that safe project? I can't find
it
in this method, nor in the caller of this method
(#handlePrimitiveError:).
Very confused, cbc
On Wed, Aug 2, 2017 at 6:22 AM, commits@source.squeak.org wrote:
David T. Lewis uploaded a new version of System to project The Trunk: http://source.squeak.org/trunk/System-dtl.961.mcz
==================== Summary ====================
Name: System-dtl.961 Author: dtl Time: 2 August 2017, 9:22:02.611529 am UUID: 4485dae2-bb1b-48ca-bdc1-5f1f4dd89eb0 Ancestors: System-eem.960
When Project class>>tryOtherProjectForRecovery 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.
Expected behavior when evaluating "Project handlePrimitiveError:
'Foobar'
"
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.
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.
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.
=============== Diff against System-eem.960 ===============
Item was changed: ----- Method: Project class>>tryOtherProjectForRecovery: (in category 'error recovery') ----- tryOtherProjectForRecovery: errorMessage "Try entering the parent project if it uses a different user interface. We determine this by comparing the project's class."
| safeProject nextProject | nextProject := Project current. safeProject := nil. [safeProject notNil or: [nextProject isTopProject]] whileFalse:
[
nextProject := nextProject parent.
(Project current isKindOf: nextProject class)
nextProject class == Project current class ifFalse: [safeProject := nextProject]]. safeProject ifNotNil: [:p | p enterForEmergencyRecovery. "Active process will usually suspend after this."].!
squeak-dev@lists.squeakfoundation.org