summaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-08-01 16:31:53 +0200
committerJani Heikkinen <jani.heikkinen@qt.io>2018-10-30 12:41:54 +0000
commit7f0db6d0472037a3ec005f9066f6222d78de60e1 (patch)
tree30e2acee27523678f56ae2a9dc61847cace7c287 /src/qml/jsruntime/qv4engine_p.h
parentb190d0d160e1cf5bbe65f8ff54752e8a7d33b49b (diff)
Add convenience functions for creating and inspecting error objects
Serves to simplify porting from QtScript by replacing QScriptContext::Error and QScriptContext::throwError(). Change-Id: I4bfe404c358c50aaf3b5469a4304fec97552bf24 Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 928c9f4947..64c7e2f32b 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -522,13 +522,16 @@ public:
Heap::RegExpObject *newRegExpObject(const QRegExp &re);
Heap::Object *newErrorObject(const Value &value);
+ Heap::Object *newErrorObject(const QString &message);
Heap::Object *newSyntaxErrorObject(const QString &message, const QString &fileName, int line, int column);
Heap::Object *newSyntaxErrorObject(const QString &message);
Heap::Object *newReferenceErrorObject(const QString &message);
Heap::Object *newReferenceErrorObject(const QString &message, const QString &fileName, int line, int column);
Heap::Object *newTypeErrorObject(const QString &message);
Heap::Object *newRangeErrorObject(const QString &message);
+ Heap::Object *newURIErrorObject(const QString &message);
Heap::Object *newURIErrorObject(const Value &message);
+ Heap::Object *newEvalErrorObject(const QString &message);
Heap::PromiseObject *newPromiseObject();
Heap::Object *newPromiseObject(const QV4::FunctionObject *thisObject, const QV4::PromiseCapability *capability);