aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsapi/qjsengine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsapi/qjsengine.cpp')
-rw-r--r--src/qml/jsapi/qjsengine.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jsapi/qjsengine.cpp b/src/qml/jsapi/qjsengine.cpp
index 3bde6a60c4..aab72f8b2d 100644
--- a/src/qml/jsapi/qjsengine.cpp
+++ b/src/qml/jsapi/qjsengine.cpp
@@ -927,6 +927,10 @@ bool QJSEngine::convertV2(const QJSValue &value, int type, void *ptr)
}
\endcode
+ If you need a more specific run-time error to describe an exception, you can use the
+ \l {QJSEngine::}{throwError(QJSValue::ErrorType errorType, const QString &message)}
+ overload.
+
\since Qt 5.12
\sa {Script Exceptions}
*/
@@ -936,6 +940,8 @@ void QJSEngine::throwError(const QString &message)
}
/*!
+ \overload throwError()
+
Throws a run-time error (exception) with the given \a errorType and
\a message.