Skip to content

Commit a90331f

Browse files
committed
Rename error to errorMessageAndResponse
1 parent 8a3195a commit a90331f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/HLAdapter.hx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class HLAdapter extends DebugSession {
9696
if( args.allowEval != null ) allowEvalGetters = args.allowEval;
9797

9898
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()));
100100
sendEvent(new TerminatedEvent());
101101
}
102102

@@ -151,7 +151,7 @@ class HLAdapter extends DebugSession {
151151
Sys.setCwd(workspaceDirectory);
152152
startDebug(args.program,args.port, function(msg) {
153153
if( msg != null ) {
154-
error(cast response, msg);
154+
errorMessageAndResponse(cast response, msg);
155155
sendEvent(new TerminatedEvent());
156156
return;
157157
}
@@ -160,7 +160,7 @@ class HLAdapter extends DebugSession {
160160
});
161161
}
162162

163-
function error<T>(response:Response<T>, message:Dynamic) {
163+
function errorMessageAndResponse<T>(response:Response<T>, message:Dynamic) {
164164
errorMessage("ERROR : " + message);
165165
sendErrorResponse(cast response, 3000, "" + message);
166166
}
@@ -282,9 +282,9 @@ class HLAdapter extends DebugSession {
282282
});
283283
proc.on('error', function(err) {
284284
if( err.message == "spawn hl ENOENT" )
285-
error(cast response, "Could not start 'hl' process, executable was not found in PATH.\nRestart VSCode or computer.");
285+
errorMessageAndResponse(cast response, "Could not start 'hl' process, executable was not found in PATH.\nRestart VSCode or computer.");
286286
else
287-
error(cast response, 'Failed to start hl process (${err.message})');
287+
errorMessageAndResponse(cast response, 'Failed to start hl process (${err.message})');
288288
});
289289
}
290290

@@ -323,7 +323,6 @@ class HLAdapter extends DebugSession {
323323
msg += ". On Linux, please try set /proc/sys/kernel/yama/ptrace_scope to 0.";
324324
onError(msg);
325325
return;
326-
return;
327326
}
328327
dbg.eval.allowEvalGetters = allowEvalGetters;
329328
syncThreads();

0 commit comments

Comments
 (0)