diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-11-28 11:00:23 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2012-11-28 12:31:20 +0100 |
commit | 4bd20c2ac36c59eb72acc71bc78ddbc058199666 (patch) | |
tree | ecf040f99ed7872ab578c4b3984204350c88ba4e /qmljs_engine.cpp | |
parent | 61460c785907049567120e07dcadd714fff93cdb (diff) |
Throw a SyntaxError instead of printing an error message.
Change-Id: I94ef8a4f2bea80bc3689b104e381a9dc134439fa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qmljs_engine.cpp')
-rw-r--r-- | qmljs_engine.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qmljs_engine.cpp b/qmljs_engine.cpp index acf221304e..6ac7250aef 100644 --- a/qmljs_engine.cpp +++ b/qmljs_engine.cpp @@ -316,6 +316,13 @@ Object *ExecutionEngine::newErrorObject(const Value &value) return object; } +Object *ExecutionEngine::newSyntaxErrorObject(ExecutionContext *ctx, DiagnosticMessage *message) +{ + SyntaxErrorObject *object = new SyntaxErrorObject(ctx, message); + object->prototype = syntaxErrorPrototype; + return object; +} + Object *ExecutionEngine::newMathObject(ExecutionContext *ctx) { MathObject *object = new MathObject(ctx); |