Open gaoqiangz opened 2 years ago
Let me check as well. It used to work for TIS.
Isn't ex
supposed to be of type Value
rather than String
?
@SonnyX not really, there's a conversion from result: https://github.com/sciter-sdk/rust-sciter/blob/master/src/value.rs#L1037
I confirm, it doesn't work in JS.
try {
stdout.println("call", view.throw());
}
catch(e) {
stdout.println("exception", e);
}
try {
console.log("call", Window.this.xcall("throw"));
} catch(e) {
console.log("exception", e);
}
It prints "exception" in TIS but "call" in JS.
@c-smile Andrew, we initialize an exception here similar to value::make_error
by calling ValueStringDataSet
with UT_STRING_ERROR
. It used to work in TIScript but doesn't work in JS (and seems has never been working judging by to a quick pick of several JS versions).
rust:
js: