@@ -41,6 +41,7 @@ export class MI2 extends EventEmitter implements IBackend {
4141 this . process . stdout . on ( "data" , this . stdout . bind ( this ) ) ;
4242 this . process . stderr . on ( "data" , this . stderr . bind ( this ) ) ;
4343 this . process . on ( "exit" , ( ( ) => { this . emit ( "quit" ) ; } ) . bind ( this ) ) ;
44+ this . process . on ( "error" , ( ( err ) => { this . emit ( "launcherror" , err ) ; } ) . bind ( this ) ) ;
4445 let promises = this . initCommands ( target , cwd ) ;
4546 if ( procArgs && procArgs . length )
4647 promises . push ( this . sendCommand ( "exec-arguments " + procArgs ) ) ;
@@ -196,6 +197,7 @@ export class MI2 extends EventEmitter implements IBackend {
196197 this . process . stdout . on ( "data" , this . stdout . bind ( this ) ) ;
197198 this . process . stderr . on ( "data" , this . stderr . bind ( this ) ) ;
198199 this . process . on ( "exit" , ( ( ) => { this . emit ( "quit" ) ; } ) . bind ( this ) ) ;
200+ this . process . on ( "error" , ( ( err ) => { this . emit ( "launcherror" , err ) ; } ) . bind ( this ) ) ;
199201 var commands = [
200202 this . sendCommand ( "gdb-set target-async on" ) ,
201203 this . sendCommand ( "environment-directory \"" + escape ( cwd ) + "\"" )
@@ -224,6 +226,7 @@ export class MI2 extends EventEmitter implements IBackend {
224226 this . process . stdout . on ( "data" , this . stdout . bind ( this ) ) ;
225227 this . process . stderr . on ( "data" , this . stderr . bind ( this ) ) ;
226228 this . process . on ( "exit" , ( ( ) => { this . emit ( "quit" ) ; } ) . bind ( this ) ) ;
229+ this . process . on ( "error" , ( ( err ) => { this . emit ( "launcherror" , err ) ; } ) . bind ( this ) ) ;
227230 Promise . all ( [
228231 this . sendCommand ( "gdb-set target-async on" ) ,
229232 this . sendCommand ( "environment-directory \"" + escape ( cwd ) + "\"" ) ,
0 commit comments