Chris Muller uploaded a new version of Kernel to project Squeak 4.6:
http://source.squeak.org/squeak46/Kernel-eem.932.mcz ==================== Summary ==================== Name: Kernel-eem.932 Author: eem Time: 1 July 2015, 4:38:42.065 pm UUID: 12b4ce38-269d-4f6f-9b12-eae61d403a03 Ancestors: Kernel-eem.931 Provide the same Debugger label support as complete: for the step into block support. =============== Diff against Kernel-eem.929 =============== Item was added: + ----- Method: Exception>>canSearchForSignalerContext (in category 'debug support') ----- + canSearchForSignalerContext + "This method is /only/ to support the debugger's catching of exceptions in stepIntoBlock." + ^signalContext isContext! Item was changed: + ----- Method: Exception>>signalerContext (in category 'handling') ----- - ----- Method: Exception>>signalerContext (in category 'printing') ----- signalerContext "Find the first sender of signal(:)" ^ signalContext findContextSuchThat: [:ctxt | (ctxt receiver == self or: [ctxt receiver == self class]) not]! Item was changed: ----- Method: Process>>complete: (in category 'changing suspended state') ----- complete: aContext "Run self until aContext is popped or an unhandled error is raised. Return self's new top context, unless an unhandled error was raised then return the signaler context (rather than open a debugger)." | ctxt pair error | ctxt := suspendedContext. suspendedContext := nil. "disable this process while running its stack in active process below" pair := Processor activeProcess evaluate: [ctxt runUntilErrorOrReturnFrom: aContext] onBehalfOf: self. suspendedContext := pair first. error := pair second. + error ifNotNil: + ["Give a debugger a chance to update its title to reflect the new exception" + Notification new + tag: {aContext. error}; + signal. + ^error signalerContext]. - error ifNotNil: [^ error signalerContext]. ^ suspendedContext! 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." - "Resume self until the home of top context is aContext. Top context may be a block context." + ^Processor activeProcess + evaluate: + [| home anError | + home := aContext home. + [suspendedContext := suspendedContext step. + home == suspendedContext home or: [home isDead]] whileFalse: + [(suspendedContext selector == #signalForException: + 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! - | home ctxt | - home := aContext home. - [ ctxt := self step. - home == ctxt home. - ] whileFalse: [ - home isDead ifTrue: [^ self suspendedContext]. - ]. - ^ self suspendedContext! |
Free forum by Nabble | Edit this page |