}
@Override
public void handleThrowable(Throwable t) {
if (t instanceof ThrowException) {
ThrowException e = (ThrowException) t;
Object value = e.getValue();
if (value != null && value instanceof JSObject) {
Object stack = ((JSObject) value).get(this.runtime.getDefaultExecutionContext(), "stack");
System.err.print(stack);
} else if (t.getCause() != null) {
this.handleThrowable(new ThrowException(null, e.getCause()));
} else {
this.handleThrowable(new ThrowException(null, e));
}
} else {
this.handleThrowable(new ThrowException(null, t));
}
}