aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/buildgraph/jscommandexecutor.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-04-10 12:59:32 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-04-15 12:20:16 +0200
commit9553d270d18f1f5e0be838a750a8443d8218ff9e (patch)
treec976749d3d00e54a624421b0a9159af21f8c3646 /src/lib/corelib/buildgraph/jscommandexecutor.cpp
parent0428fa446c3db835cadf6cbe6e9237bb27073403 (diff)
Sanitize error/finished handling in executor jobs and command executors.
The classes as they are now specify different signals for signaling failure and finishing. Some of these error() signals are followed by a finished() signal, others are not, which is just asking for trouble. Under certain circumstances there can also be several error() signals for one and the same process. In fact, there is almost certainly a race condition there regarding executor job re-use. This patch changes the design so that there is always exactly one finished() signal that carries an error status. For some non-fatal problems that higher-level code cannot sensibly handle, we now log a warning instead of emitting an error signal. Change-Id: I9e3df11564e7337ad766ca0d009303367d43c4ec Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'src/lib/corelib/buildgraph/jscommandexecutor.cpp')
-rw-r--r--src/lib/corelib/buildgraph/jscommandexecutor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/jscommandexecutor.cpp b/src/lib/corelib/buildgraph/jscommandexecutor.cpp
index 0b09a69ac..698002988 100644
--- a/src/lib/corelib/buildgraph/jscommandexecutor.cpp
+++ b/src/lib/corelib/buildgraph/jscommandexecutor.cpp
@@ -174,7 +174,7 @@ void JsCommandExecutor::onJavaScriptCommandFinished()
logger().qbsDebug() << "JS code:\n" << jsCommand()->sourceCode();
QString msg = tr("Error while executing JavaScriptCommand:\n");
msg += result.errorMessage;
- emit error(ErrorInfo(msg, result.errorLocation));
+ emit finished(ErrorInfo(msg, result.errorLocation));
}
emit finished();
}