Skip to content

Commit 77e0f13

Browse files
committed
Better exception display: read value in ValueException
1 parent 2a70b51 commit 77e0f13

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/HLAdapter.hx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,15 @@ class HLAdapter extends DebugSession {
469469
var exc = dbg.getException();
470470
var str = null;
471471
if( exc != null ) {
472+
switch( exc.t ) {
473+
case HObj({ name:"haxe.ValueException" }):
474+
try {
475+
exc = dbg.eval.readField(exc, "value");
476+
} catch(e) {
477+
debug("Error extracting ValueException value: " + e.message);
478+
}
479+
default:
480+
}
472481
str = switch( exc.v ) {
473482
case VString(str, _): str;
474483
default: dbg.eval.valueStr(exc);

0 commit comments

Comments
 (0)