aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/transformer.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@qt.io>2017-05-03 12:38:44 +0200
committerChristian Kandeler <christian.kandeler@qt.io>2017-05-04 11:46:09 +0000
commit512704a52858688366a99d8959bf75ee35099e19 (patch)
tree1029e2fe5afcb295b982c5b4fd14d067ff2efdc3 /src/lib/corelib/buildgraph/transformer.cpp
parentb60004ea8ae2e0717e6fab2f40bfe90bac7cf6b7 (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/transformer.cpp')
-rw-r--r--src/lib/corelib/buildgraph/transformer.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/corelib/buildgraph/transformer.cpp b/src/lib/corelib/buildgraph/transformer.cpp
index ef728379b..a9b51f151 100644
--- a/src/lib/corelib/buildgraph/transformer.cpp
+++ b/src/lib/corelib/buildgraph/transformer.cpp
@@ -231,13 +231,8 @@ void Transformer::createCommands(ScriptEngine *engine, const ScriptFunctionConst
propertiesRequestedInPrepareScript = engine->propertiesRequestedInScript();
propertiesRequestedFromArtifactInPrepareScript = engine->propertiesRequestedFromArtifact();
engine->clearRequestedProperties();
- if (Q_UNLIKELY(engine->hasErrorOrException(scriptValue))) {
- ErrorInfo errorInfo(engine->lastErrorString(scriptValue),
- engine->uncaughtExceptionBacktraceOrEmpty());
- errorInfo.append(QStringLiteral("Rule.prepare"), script->location);
- throw errorInfo;
- }
-
+ if (Q_UNLIKELY(engine->hasErrorOrException(scriptValue)))
+ throw engine->lastError(scriptValue, script->location);
commands.clear();
if (scriptValue.isArray()) {
const int count = scriptValue.property(QLatin1String("length")).toInt32();