diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2014-02-10 21:15:41 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-02-18 10:01:48 +0100 |
commit | 3c0bf1c0a8fe80f75f9e9194637c86726d156c82 (patch) | |
tree | 7a4ce1ab2cf8d44d960168f4ee25287024c000c0 /src/qml/qml/qqmlvme.cpp | |
parent | a65b8785621ebf58f34eb0c1759376fc0a1117c7 (diff) |
[new compiler] Fix error reporting null object group property access
The new code path reported line and column, the latter was missing from the old
code path and is easily added.
Change-Id: I730e56f0fe4e99091dfb10e5f601faf1d3b8949c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlvme.cpp')
-rw-r--r-- | src/qml/qml/qqmlvme.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlvme.cpp b/src/qml/qml/qqmlvme.cpp index e60010ade8..ce4997fef9 100644 --- a/src/qml/qml/qqmlvme.cpp +++ b/src/qml/qml/qqmlvme.cpp @@ -92,6 +92,17 @@ using namespace QQmlVMETypes; goto exceptionExit; \ } +#define VME_EXCEPTION_WITH_COLUMN(desc, line, column) \ + { \ + QQmlError error; \ + error.setDescription(desc.trimmed()); \ + error.setLine(line); \ + error.setColumn(column); \ + error.setUrl(COMP->url); \ + *errors << error; \ + goto exceptionExit; \ + } + bool QQmlVME::s_enableComponentComplete = true; void QQmlVME::init(QQmlContextData *ctxt, QQmlCompiledData *comp, int start, @@ -992,7 +1003,7 @@ QObject *QQmlVME::run(QList<QQmlError> *errors, instr.property, a); if (!obj) - VME_EXCEPTION(tr("Cannot set properties on %1 as it is null").arg(QString::fromUtf8(target->metaObject()->property(instr.property).name())), instr.line); + VME_EXCEPTION_WITH_COLUMN(tr("Cannot set properties on %1 as it is null").arg(QString::fromUtf8(target->metaObject()->property(instr.property).name())), instr.line, instr.column); objects.push(obj); qmlBindingWrappers[objects.count() - 1] = QV4::Primitive::undefinedValue(); |