diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-09-04 10:25:37 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-10-11 14:40:18 +0000 |
commit | a4852b1ee77a913f6cc4806e6606c1b720e8f40b (patch) | |
tree | ac430430bf167465153485974e31fb4d9f723e75 /src/qml/compiler/qv4compiler.cpp | |
parent | b6f7fe1f80e6beed62ef47691fae6aa9f4a851b8 (diff) |
Fix error reporting when imports or re-exports in modules fail
Collect the location of the import/export statement and include it in
the exception thrown.
Change-Id: I7966dfd53ed67d2d7087acde2dd8ff67c64cb044
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compiler.cpp')
-rw-r--r-- | src/qml/compiler/qv4compiler.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index f2e3aaedb5..7636baa1e6 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -342,6 +342,7 @@ QV4::CompiledData::Unit *QV4::Compiler::JSUnitGenerator::generateUnit(GeneratorO entryToWrite->moduleRequest = getStringId(entry.moduleRequest); entryToWrite->importName = getStringId(entry.importName); entryToWrite->localName = getStringId(entry.localName); + entryToWrite->location = entry.location; entryToWrite++; } }; @@ -356,6 +357,7 @@ QV4::CompiledData::Unit *QV4::Compiler::JSUnitGenerator::generateUnit(GeneratorO entryToWrite->moduleRequest = getStringId(entry.moduleRequest); entryToWrite->importName = getStringId(entry.importName); entryToWrite->localName = getStringId(entry.localName); + entryToWrite->location = entry.location; entryToWrite++; } } |