aboutsummaryrefslogtreecommitdiffstats
path: root/main.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2012-11-13 13:44:16 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2012-11-14 08:44:51 +0100
commit72c07ef0469838f5776824065faf9efda0261f9e (patch)
tree54352a6b11f100854589395741212675ba0d4b65 /main.cpp
parent2a8d0b894ba59c6e8966b39bf872ce081579f50d (diff)
Give an error message when a JS file does not exist.
Instead of silently failing, which is a bit ambiguous in case of test262. Change-Id: I8b8dc066df63f93273ccc6c27547edfcd1a68cb7 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'main.cpp')
-rw-r--r--main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index 530757ed4e..8b1b0ac53b 100644
--- a/main.cpp
+++ b/main.cpp
@@ -198,6 +198,9 @@ int compileFiles(const QStringList &files, QQmlJS::LLVMOutputType outputType)
int result = compile(fileName, source, outputType);
if (result != EXIT_SUCCESS)
return result;
+ } else {
+ std::cerr << "Error: cannot open file " << fileName.toUtf8().constData() << std::endl;
+ return EXIT_FAILURE;
}
}
return EXIT_SUCCESS;
@@ -417,6 +420,9 @@ int main(int argc, char *argv[])
return exitCode;
if (errorInTestHarness)
return EXIT_FAILURE;
+ } else {
+ std::cerr << "Error: cannot open file " << fn.toUtf8().constData() << std::endl;
+ return EXIT_FAILURE;
}
}
} return EXIT_SUCCESS;