diff options
author | Christian Kandeler <christian.kandeler@qt.io> | 2017-05-03 12:38:44 +0200 |
---|---|---|
committer | Christian Kandeler <christian.kandeler@qt.io> | 2017-05-04 11:46:09 +0000 |
commit | 512704a52858688366a99d8959bf75ee35099e19 (patch) | |
tree | 1029e2fe5afcb295b982c5b4fd14d067ff2efdc3 /src/lib/corelib/buildgraph/depscanner.cpp | |
parent | b60004ea8ae2e0717e6fab2f40bfe90bac7cf6b7 (diff) |
Try harder to find out the correct location for evaluation errors
Task-number: QBS-946
Change-Id: I2fb5d573f7caf44f96fd4a96fd5069a44cdfb16a
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'src/lib/corelib/buildgraph/depscanner.cpp')
-rw-r--r-- | src/lib/corelib/buildgraph/depscanner.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/depscanner.cpp b/src/lib/corelib/buildgraph/depscanner.cpp index 8dc99f5ed..fddacfc5d 100644 --- a/src/lib/corelib/buildgraph/depscanner.cpp +++ b/src/lib/corelib/buildgraph/depscanner.cpp @@ -250,8 +250,9 @@ QStringList UserDependencyScanner::evaluate(Artifact *artifact, const ScriptFunc m_engine->clearRequestedProperties(); if (Q_UNLIKELY(m_engine->hasErrorOrException(result))) { QString msg = Tr::tr("evaluating scan script: ") + m_engine->lastErrorString(result); + const CodeLocation loc = m_engine->lastErrorLocation(result, script->location); m_engine->clearExceptions(); - throw ErrorInfo(msg, script->location); + throw ErrorInfo(msg, loc); } QStringList list; if (result.isArray()) { |