flutter_qjs
flutter_qjs copied to clipboard
Custom JS error properties are lost
Given the following JS Error
class MyCustomError extends Error {
constructor(status, message)
{
super(message);
this.status = status;
}
}
If this error is thrown from inside a QJS script, the status
property will be lost.
try {
qjs.evaluate('throw new MyCustomError(1234, "Oops");');
} catch (e) {
// status property is lost
print(e);
}