aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 18b0de3077..97247ad368 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -579,6 +579,13 @@ ReturnedValue ExecutionContext::throwRangeError(const ValueRef value)
return throwError(error);
}
+ReturnedValue ExecutionContext::throwRangeError(const QString &message)
+{
+ Scope scope(this);
+ ScopedObject error(scope, engine->newRangeErrorObject(message));
+ return throwError(error);
+}
+
ReturnedValue ExecutionContext::throwURIError(const ValueRef msg)
{
Scope scope(this);