chore: nothing of use

This commit is contained in:
TopchetoEU 2023-10-28 17:10:27 +03:00
parent edb71daef4
commit dc9d84a370
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4

View File

@ -344,6 +344,25 @@ public class SimpleDebugger implements Debugger {
return JSON.toJs(val.get("value"));
}
private JSONMap serializeException(Context ctx, EngineException err) {
String text = null;
try {
text = Values.toString(ctx, err.value);
}
catch (EngineException e) {
text = "[error while stringifying]";
}
var res = new JSONMap()
.set("exceptionId", nextId())
.set("exception", serializeObj(ctx, err.value))
.set("exception", serializeObj(ctx, err.value))
.set("text", text);
return res;
}
private void resume(State state) {
this.state = state;
ws.send(new V8Event("Debugger.resumed", new JSONMap()));
@ -558,6 +577,8 @@ public class SimpleDebugger implements Debugger {
if (group != null) setObjectGroup(group, res.result);
if (res.error != null) ws.send(msg.respond(new JSONMap().set("exceptionDetails", serializeObj(res.ctx, res.result))));
ws.send(msg.respond(new JSONMap().set("result", serializeObj(res.ctx, res.result))));
}