summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@theqtcompany.com>2014-11-20 17:17:31 +0100
committerChristian Kandeler <christian.kandeler@theqtcompany.com>2014-11-21 11:58:49 +0100
commit3f4465a78a6ab571dc600235bfc53614d8e92a64 (patch)
tree1c4fd4ba3c9b1e84e8f19dcc40a4082f3fc54529 /src/lib
parenta390e69a389c4e00be5d3eb42a35d069f14a3614 (diff)
downloadqbs-3f4465a78a6ab571dc600235bfc53614d8e92a64.tar.gz
Throw a proper error when encountering invalid outputArtifact values.
A user can easily trigger this condition, so we can't assert on it. Change-Id: Id26ee13dbcea6207da316f454ecf357a284be2da Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/corelib/buildgraph/rulesapplicator.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp
index 43eac9955..0756ac8c7 100644
--- a/src/lib/corelib/buildgraph/rulesapplicator.cpp
+++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp
@@ -448,7 +448,10 @@ public:
Artifact *RulesApplicator::createOutputArtifactFromScriptValue(const QScriptValue &obj,
const ArtifactSet &inputArtifacts)
{
- QBS_CHECK(obj.isObject());
+ if (!obj.isObject()) {
+ throw ErrorInfo(Tr::tr("Elements of the Rule.outputArtifacts array must be "
+ "of Object type."), m_rule->outputArtifactsScript->location);
+ }
const QString filePath = FileInfo::resolvePath(m_product->buildDirectory(),
obj.property(QLatin1String("filePath")).toVariant().toString());
const FileTags fileTags = FileTags::fromStringList(