diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-06-07 16:20:54 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2013-06-07 18:33:44 +0200 |
commit | 1dedc7caa0f474e2c0fa35bfae8d2262ed32f24d (patch) | |
tree | 3bf45d702db04f62353a6f9aa218245c5deefac9 /src/qml/qml/qqmlcontextwrapper.cpp | |
parent | 7426f1a5cad9b788aaea98130b06557c553f95e6 (diff) |
Fix tst_qqmlecmascript::scriptErrors()
* In the context wrapper, throw a real JS exception that when serialized
to a string includes the "Error:" prefix (due to the error object's name)
* Added column information to one of the expected error messages
Change-Id: I4c1bc749f01425efb0a27121f7f1b8cf4946d644
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlcontextwrapper.cpp')
-rw-r--r-- | src/qml/qml/qqmlcontextwrapper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlcontextwrapper.cpp b/src/qml/qml/qqmlcontextwrapper.cpp index 592472e3c1..5507c8b966 100644 --- a/src/qml/qml/qqmlcontextwrapper.cpp +++ b/src/qml/qml/qqmlcontextwrapper.cpp @@ -310,7 +310,7 @@ void QmlContextWrapper::put(Managed *m, ExecutionContext *ctx, String *name, con if (wrapper->readOnly) { QString error = QLatin1String("Invalid write to global property \"") + name->toQString() + QLatin1Char('"'); - ctx->throwError(Value::fromString(ctx->engine->newString(error))); + ctx->throwError(error); } Object::put(m, ctx, name, value); |