From cfd849dbb5b4362ff4ad943c8e3534d34ec75b25 Mon Sep 17 00:00:00 2001 From: Yuxiao Mao Date: Tue, 29 Oct 2024 15:26:48 +0100 Subject: [PATCH] Prevent launch error display stack twice --- src/HLAdapter.hx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/HLAdapter.hx b/src/HLAdapter.hx index 50ef03f..6ba8da4 100644 --- a/src/HLAdapter.hx +++ b/src/HLAdapter.hx @@ -123,7 +123,7 @@ class HLAdapter extends DebugSession { if( port == null ) port = debugPort; if( args.allowEval != null ) allowEvalGetters = args.allowEval; - function onError(e) { + function onError(e : String) { errorMessageAndResponse(cast response, e + "\n" + haxe.CallStack.toString(haxe.CallStack.exceptionStack())); sendEvent(new TerminatedEvent()); } @@ -143,7 +143,7 @@ class HLAdapter extends DebugSession { }); } } catch( e : Dynamic ) { - onError(e + "\n" + haxe.CallStack.toString(haxe.CallStack.exceptionStack())); + onError(e); } }