@@ -96,7 +96,7 @@ class HLAdapter extends DebugSession {
96
96
if ( args .allowEval != null ) allowEvalGetters = args .allowEval ;
97
97
98
98
function onError (e ) {
99
- error (cast response , e + " \n " + haxe. CallStack .toString (haxe. CallStack .exceptionStack ()));
99
+ errorMessageAndResponse (cast response , e + " \n " + haxe. CallStack .toString (haxe. CallStack .exceptionStack ()));
100
100
sendEvent (new TerminatedEvent ());
101
101
}
102
102
@@ -151,7 +151,7 @@ class HLAdapter extends DebugSession {
151
151
Sys .setCwd (workspaceDirectory );
152
152
startDebug (args .program ,args .port , function (msg ) {
153
153
if ( msg != null ) {
154
- error (cast response , msg );
154
+ errorMessageAndResponse (cast response , msg );
155
155
sendEvent (new TerminatedEvent ());
156
156
return ;
157
157
}
@@ -160,7 +160,7 @@ class HLAdapter extends DebugSession {
160
160
});
161
161
}
162
162
163
- function error <T >(response : Response <T >, message : Dynamic ) {
163
+ function errorMessageAndResponse <T >(response : Response <T >, message : Dynamic ) {
164
164
errorMessage (" ERROR : " + message );
165
165
sendErrorResponse (cast response , 3000 , " " + message );
166
166
}
@@ -282,9 +282,9 @@ class HLAdapter extends DebugSession {
282
282
});
283
283
proc .on (' error' , function (err ) {
284
284
if ( err .message == " spawn hl ENOENT" )
285
- error (cast response , " Could not start 'hl' process, executable was not found in PATH.\n Restart VSCode or computer." );
285
+ errorMessageAndResponse (cast response , " Could not start 'hl' process, executable was not found in PATH.\n Restart VSCode or computer." );
286
286
else
287
- error (cast response , ' Failed to start hl process ( ${err .message })' );
287
+ errorMessageAndResponse (cast response , ' Failed to start hl process ( ${err .message })' );
288
288
});
289
289
}
290
290
@@ -323,7 +323,6 @@ class HLAdapter extends DebugSession {
323
323
msg + = " . On Linux, please try set /proc/sys/kernel/yama/ptrace_scope to 0." ;
324
324
onError (msg );
325
325
return ;
326
- return ;
327
326
}
328
327
dbg .eval .allowEvalGetters = allowEvalGetters ;
329
328
syncThreads ();
0 commit comments