diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-03 14:37:49 +0100 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2020-12-07 15:53:32 +0100 |
commit | e8596de70e46e98a851ac8204e294e5ef4994b96 (patch) | |
tree | 06a2555357d5b6ceea929d3a43383eed09b07f5d /src/qml/jsapi/qjsengine.h | |
parent | c8d98dc206714abd5c0dc76008ffa729973d3a8f (diff) |
Allow checking for and catching errors from QJSEngine
As you can manually throw an error, you should be able to catch it
again, too.
Change-Id: I82475df1969a1fd76f4cf5fc0a8d921dfafaef89
Reviewed-by: Maximilian Goldstein <max.goldstein@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/jsapi/qjsengine.h')
-rw-r--r-- | src/qml/jsapi/qjsengine.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h index 775f9e658a..c480a77599 100644 --- a/src/qml/jsapi/qjsengine.h +++ b/src/qml/jsapi/qjsengine.h @@ -121,6 +121,8 @@ public: void throwError(const QString &message); void throwError(QJSValue::ErrorType errorType, const QString &message = QString()); + bool hasError() const; + QJSValue catchError(); QString uiLanguage() const; void setUiLanguage(const QString &language); |