Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.0.0
-
None
-
0e929f49d716c76aec796a18b450c78842353b32
Description
bool QJSValue::isError() const
Returns true if this QJSValue is an object of the Error class; otherwise returns false.
contradicts
QJSValue QJSEngine::evaluate(const QString & program, const QString & fileName = QString(), int lineNumber = 1)
You can call isError() on the return value to determine whether an exception occurred.
Consider the two snippets:
a) return new Error();
and
b) throw "This is a string";
Judging from the QJSValue's documentation, isError() should return a) true and b) false
Judging from the QJSEngine's documentation, isError() should return a) false and b) true
What's it gonna be? Should isError() really be a wasThrown() ?