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:
parent
2a8d0b894b
commit
72c07ef046
6
main.cpp
6
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;
|
||||
|
|
Loading…
Reference in New Issue