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>
This commit is contained in:
Erik Verbruggen 2012-11-13 13:44:16 +01:00 committed by Simon Hausmann
parent 2a8d0b894b
commit 72c07ef046
1 changed files with 6 additions and 0 deletions

View File

@ -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;