The Trunk: Kernel-mt.945.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Kernel-mt.945.mcz

commits-2
Marcel Taeumel uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-mt.945.mcz

==================== 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
  evaluate:
  [| 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|
  [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};
  signal.
  ^unhandledErrorSignalerContext]]].
  suspendedContext]
  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;
  signal!

Item was changed:
+ ----- Method: UnhandledError>>exception (in category 'accessing') -----
- ----- Method: UnhandledError>>exception (in category 'as yet unclassified') -----
  exception
 
  ^ 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'!