[squeak-dev] The Inbox: System-dtl.981.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Dec 7 02:52:28 UTC 2017

David T. Lewis uploaded a new version of System to project The Inbox:

==================== Summary ====================

Name: System-dtl.981
Author: dtl
Time: 6 December 2017, 9:52:13.947225 pm
UUID: d00b5ac2-0e56-40d3-91d6-7803be283e1c
Ancestors: System-mt.980

For emergency evaluator handling, Project class>>handlePrimitiveError: will first try to find a parent project of different type (e.g. MVC if current project is Morphic, or vice versa). If found, the other project is opened, and the error is handled there. If no such project is found, then the traditional emergency evaluator transcript is opened.

Extend this strategy by first checking parent project types, and if not successful search all projects to find any project of different type.

A typical scenario is the case of an image with many Morphic projects, and one MVC project anywhere in the project hierarchy. In the event of an unrecoverable error in any of the Morphic projects, the MVC project will be identified as the project for emergency recovery. This permits an MVC debugger to be used to recover from the error condition, after which the failed Morphic user interface can be reentered.

=============== Diff against System-mt.980 ===============

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)
  			ifFalse: [safeProject := nextProject]].
+ 	"Parent project was not of a different type. Search through all known
+ 	projects to find any one that is of different project type."
+ 	safeProject ifNil: [
+ 		Smalltalk garbageCollect.
+ 		safeProject := Project allSubInstances
+ 			detect: [ :proj | proj class ~= Project
+ 				or: [ (proj isKindOf: Project current class) not ] ]
+ 			ifNone: [ nil ] ].
  	safeProject ifNotNil: [:p | 
  		p enterForEmergencyRecovery.
  		"Active process will usually suspend after this."].!

More information about the Squeak-dev mailing list