[Pkg] The Trunk: Kernel-mt.945.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Aug 25 12:54:34 UTC 2015

Marcel Taeumel uploaded a new version of Kernel to project The Trunk:

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

Name: Kernel-mt.945
Author: mt
Time: 25 August 2015, 2:54:06.221 pm
UUID: 4f53691a-f79e-4e40-b46d-33a647b642dd
Ancestors: Kernel-eem.944

Adds support for process stepping to watch out for other unhandled things. Adds a class for unhandled warnings.

=============== Diff against Kernel-eem.944 ===============

Item was changed:
  ----- Method: Process>>stepToHome: (in category 'changing suspended state') -----
  stepToHome: aContext 
  	"Resume self until the home of top context is aContext.  Top context may be a block context.
  	 Catch any UnhandledErrors that are created while stepping, answering the relevant signalerContext
  	 if so. Note that this will cause weird effects if using through to step through UnhandledError
  	 code, but as the doctor ordered, don't do that; use over or into instead."
  	^Processor activeProcess
  			[| home anError |
  			home := aContext home.
  			[suspendedContext := suspendedContext step.
  			 home == suspendedContext home or: [home isDead]] whileFalse:
  				[(suspendedContext selector == #signalForException:
+ 				 and: [(suspendedContext receiver isBehavior and: [
+ 						suspendedContext receiver includesBehavior: UnhandledError])
- 				 and: [suspendedContext receiver == UnhandledError
  				 and: [anError := suspendedContext tempAt: 1.
  					   ((suspendedContext objectClass: anError) includesBehavior: Exception)
  				 and: [anError canSearchForSignalerContext]]]) ifTrue:
  					[anError signalerContext ifNotNil:
  						[unhandledErrorSignalerContext == suspendedContext] whileFalse:
  							[self completeStep: suspendedContext].
  						"Give a debugger a chance to update its title to reflect the new exception"
  						 Notification new
  							tag: {unhandledErrorSignalerContext. anError};
  		onBehalfOf: self!

Item was changed:
  Exception subclass: #UnhandledError
  	instanceVariableNames: 'exception'
  	classVariableNames: ''
  	poolDictionaries: ''
  	category: 'Kernel-Exceptions'!
+ !UnhandledError commentStamp: 'mt 8/25/2015 14:42' prior: 0!
+ This is a wrapper for an unhandled error. Having this, process stepping is able to correctly fire other unhandled errors. See Process >> #stepToHome: for further explanations.!

Item was changed:
  ----- Method: UnhandledError class>>signalForException: (in category 'as yet unclassified') -----
  signalForException: anError
+ 	"Very important entry point for analysis stack when stepping in a debugging session. See Process >> #stepToHome: for further explanations."
  	^ self new
  		exception: anError;

Item was changed:
+ ----- Method: UnhandledError>>exception (in category 'accessing') -----
- ----- Method: UnhandledError>>exception (in category 'as yet unclassified') -----
  	^ exception!

Item was changed:
+ ----- Method: UnhandledError>>exception: (in category 'accessing') -----
- ----- Method: UnhandledError>>exception: (in category 'as yet unclassified') -----
  exception: anError
  	exception := anError!

Item was added:
+ UnhandledError subclass: #UnhandledWarning
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Kernel-Exceptions'!

More information about the Packages mailing list