The Trunk: CommandLine-cmm.4.mcz

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

The Trunk: CommandLine-cmm.4.mcz

commits-2
Chris Muller uploaded a new version of CommandLine to project The Trunk:
http://source.squeak.org/trunk/CommandLine-cmm.4.mcz

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

Name: CommandLine-cmm.4
Author: cmm
Time: 16 January 2015, 3:27:43.102 pm
UUID: 0a2ab805-2910-49f5-81dc-c7de4581f4f6
Ancestors: CommandLine-fbs.3

Let Errors print themselves.

=============== Diff against CommandLine-fbs.3 ===============

Item was changed:
  ----- Method: CommandLineToolSet class>>debugError: (in category 'debugging') -----
+ debugError: anError
- debugError: anError
  "Print out a sensible stack trace and bail"
+ self saveSnapshotOnError ifTrue: [ Smalltalk saveAs: 'Debug-' , Smalltalk imageEntry name ].
+ anError printVerboseOn: FileStream stderr.
+ FileStream stderr flush.
+ Smalltalk
+ snapshot: false
+ andQuit: true!
- | problemPlace s |
- self saveSnapshotOnError
- ifTrue: [Smalltalk saveAs: 'Debug-' , (Smalltalk imageName subStrings: '/') last].
- problemPlace := anError signalerContext.
- s := FileStream stderr.
- (anError isKindOf: MessageNotUnderstood) ifTrue: [
- s
- nextPutAll: anError messageText; cr;
- nextPutAll: problemPlace sender methodNode printString; cr].
- (problemPlace stackOfSize: 20) do: [:ctx | s cr. ctx printOn: s].
- s flush.
-
- Smalltalk snapshot: false andQuit: true!

Item was changed:
  ----- Method: CommandLineToolSet class>>debugSyntaxError: (in category 'debugging') -----
+ debugSyntaxError: anError
+ FileStream stderr
+ nextPutAll: '----- Syntax error -----' ;
+ cr ;
+ nextPutAll: anError errorCode ;
+ cr ;
+ nextPutAll: '----- Syntax error -----' ;
+ cr ;
+ flush.
- debugSyntaxError: anError
- | s |
- s := FileStream stderr.
- s nextPutAll: '----- Syntax error -----'; cr.
- s nextPutAll: anError errorCode; cr.
- s nextPutAll: '----- Syntax error -----'; cr.
-
  self debugError: anError!