* 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>
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);
QString warning3 = url.left(url.length() - 3) + "js:4: Error: Invalid write to global property \"a\"";
QString warning4 = url + ":13: ReferenceError: a is not defined";
QString warning5 = url + ":11: ReferenceError: a is not defined";
- QString warning6 = url + ":10: Unable to assign [undefined] to int";
+ QString warning6 = url + ":10:21: Unable to assign [undefined] to int";
QString warning7 = url + ":15: Error: Cannot assign to read-only property \"trueProperty\"";
QString warning8 = url + ":16: Error: Cannot assign to non-existent property \"fakeProperty\"";