Matthew Fulmer uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mtf.288.mcz ==================== Summary ==================== Name: Tools-mtf.288 Author: mtf Time: 20 December 2010, 4:38:13.101 pm UUID: 0ee4865d-e7bc-8340-b6ee-74c7503e829f Ancestors: Tools-ul.287 changed the debugger to use the convenience method to log an error, rather than hardcoding SqueakDebug.log in several places. Imported from Cobalt =============== Diff against Tools-ul.287 =============== Item was changed: ----- Method: Debugger class>>openContext:label:contents: (in category 'class initialization') ----- openContext: aContext label: aString contents: contentsStringOrNil "Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger." <primitive: 19> "Simulation guard" ErrorRecursion not & Preferences logDebuggerStackToFile ifTrue: + [Smalltalk logSqueakError: aString inContext: aContext]. - [Smalltalk logError: aString inContext: aContext to: 'SqueakDebug.log']. ErrorRecursion ifTrue:[ ErrorRecursion := false. self primitiveError: aString]. ErrorRecursion := true. self informExistingDebugger: aContext label: aString. (Debugger context: aContext) openNotifierContents: contentsStringOrNil label: aString. ErrorRecursion := false. Processor activeProcess suspend. ! Item was changed: ----- Method: Debugger class>>openOn:context:label:contents:fullView: (in category 'opening') ----- openOn: process context: context label: title contents: contentsStringOrNil fullView: bool "Open a notifier in response to an error, halt, or notify. A notifier view just shows a short view of the sender stack and provides a menu that lets the user open a full debugger." | controller errorWasInUIProcess debugger | Smalltalk isMorphic ifTrue: [errorWasInUIProcess := Project spawnNewProcessIfThisIsUI: process] ifFalse: [ controller := ScheduledControllers activeControllerProcess == process ifTrue: [ScheduledControllers activeController]. [ debugger := self new process: process controller: controller context: context. bool ifTrue: [debugger openFullNoSuspendLabel: title] ifFalse: [debugger openNotifierContents: contentsStringOrNil label: title]. Preferences logDebuggerStackToFile ifTrue: [ + Smalltalk logSqueakError: title inContext: context]. - Smalltalk logError: title inContext: context to: 'SqueakDebug.log']. ] on: Error do: [:ex | self primitiveError: 'Orginal error: ', title asString, '. Debugger error: ', ([ex description] on: Error do: ['a ', ex class printString]), ':' ]]. WorldState addDeferredUIMessage: [ "schedule debugger in deferred UI message to address redraw problems after opening a debugger e.g. from the testrunner." [ debugger := self new process: process controller: nil context: context. bool ifTrue: [debugger openFullNoSuspendLabel: title] ifFalse: [debugger openNotifierContents: contentsStringOrNil label: title]. debugger errorWasInUIProcess: errorWasInUIProcess. Preferences logDebuggerStackToFile ifTrue: [ + Smalltalk logSqueakError: title inContext: context]. - Smalltalk logError: title inContext: context to: 'SqueakDebug.log']. ] on: Error do: [:ex | self primitiveError: 'Orginal error: ', title asString, '. Debugger error: ', ([ex description] on: Error do: ['a ', ex class printString]), ':' ] ]. process suspend. ! Item was changed: ----- Method: Debugger>>storeLog (in category 'notifier menu') ----- storeLog + + Smalltalk logSqueakError: labelString printString inContext: contextStackTop - | logFileName | - logFileName := Preferences debugLogTimestamp - ifTrue: ['SqueakDebug-' , Time totalSeconds printString , '.log'] - ifFalse: ['SqueakDebug.log']. - Smalltalk logError: labelString printString inContext: contextStackTop to: logFileName ! |
Free forum by Nabble | Edit this page |