File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,8 @@ exports.command = clc.cyan;
23
23
exports . commandContent = clc . magenta ;
24
24
25
25
exports . showError = function ( header , ex ) {
26
- console . error ( common . errorHeader ( header ) ) ;
27
- console . error ( common . errorMessage ( ex && ex . stack ? ex . stack : ex ) ) ;
26
+ console . error ( exports . errorHeader ( header ) ) ;
27
+ console . error ( exports . errorMessage ( ex && ex . stack ? ex . stack : ex ) ) ;
28
28
process . exit ( 1 ) ;
29
29
} ;
30
30
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ function ready() {
136
136
var endTime = Date . now ( ) ;
137
137
} catch ( ex ) {
138
138
console . log = logFunc ;
139
+ if ( ex . loc ) ex . message += " at " + ex . loc . start . line + ":" + ex . loc . start . column ;
139
140
common . showError ( "Could not execute AST" , ex ) ;
140
141
}
141
142
Original file line number Diff line number Diff line change @@ -82,7 +82,8 @@ if (code) {
82
82
ready ( ) ;
83
83
} else if ( process . argv . length > 2 ) {
84
84
try {
85
- parseCode = fs . readFileSync ( process . argv [ 2 ] ) ;
85
+ parseCode = fs . readFileSync ( process . argv [ 2 ] , 'utf8' ) ;
86
+ ready ( ) ;
86
87
} catch ( ex ) {
87
88
common . showError ( "Could not read MCA file" , ex ) ;
88
89
}
You can’t perform that action at this time.
0 commit comments