@@ -174,7 +174,6 @@ function getErrMessage(message, fn) {
174
174
const line = call . getLineNumber ( ) - 1 ;
175
175
let column = call . getColumnNumber ( ) - 1 ;
176
176
let identifier ;
177
- let code ;
178
177
179
178
if ( filename ) {
180
179
identifier = `${ filename } ${ line } ${ column } ` ;
@@ -199,7 +198,7 @@ function getErrMessage(message, fn) {
199
198
// errors are handled faster.
200
199
if ( errorStackTraceLimitIsWritable ) Error . stackTraceLimit = 0 ;
201
200
202
- if ( filename ) {
201
+ {
203
202
if ( decoder === undefined ) {
204
203
const { StringDecoder } = require ( 'string_decoder' ) ;
205
204
decoder = new StringDecoder ( 'utf8' ) ;
@@ -217,12 +216,6 @@ function getErrMessage(message, fn) {
217
216
( { 0 : column , 1 : message } = getCode ( fd , line , column ) ) ;
218
217
// Flush unfinished multi byte characters.
219
218
decoder . end ( ) ;
220
- } else {
221
- for ( let i = 0 ; i < line ; i ++ ) {
222
- code = StringPrototypeSlice ( code ,
223
- StringPrototypeIndexOf ( code , '\n' ) + 1 ) ;
224
- }
225
- ( { 0 : column , 1 : message } = parseCode ( code , column ) ) ;
226
219
}
227
220
// Always normalize indentation, otherwise the message could look weird.
228
221
if ( StringPrototypeIncludes ( message , '\n' ) ) {
0 commit comments