File tree 1 file changed +3
-5
lines changed
arduino-debugger-extension/src/node/debug-adapter
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,8 @@ export class ArduinoParser extends MIParser {
50
50
this . pos = 0 ;
51
51
this . handleLine ( ) ;
52
52
// Detect error emitted as log message
53
- if ( line . startsWith ( '&"error' ) && this . rejectReady ) {
54
- this . line = line ;
55
- this . pos = 0 ;
56
- this . next ( ) ;
53
+ if ( this . rejectReady && line . toLowerCase ( ) . startsWith ( '&"error' ) ) {
54
+ this . pos = 1 ;
57
55
this . rejectReady ( new Error ( this . handleCString ( ) || regexArray [ 1 ] ) ) ;
58
56
this . rejectReady = undefined ;
59
57
}
@@ -72,7 +70,7 @@ export class ArduinoParser extends MIParser {
72
70
const line = regexArray [ 1 ] ;
73
71
this . gdb . emit ( 'consoleStreamOutput' , line + '\n' , 'stderr' ) ;
74
72
// Detect error emitted on the stderr stream
75
- if ( line . toLowerCase ( ) . startsWith ( 'error' ) && this . rejectReady ) {
73
+ if ( this . rejectReady && line . toLowerCase ( ) . startsWith ( 'error' ) ) {
76
74
this . rejectReady ( new Error ( line ) ) ;
77
75
this . rejectReady = undefined ;
78
76
}
You can’t perform that action at this time.
0 commit comments