1
0
Fork 0

issue #737: adjusted error message

This commit is contained in:
Jan Steemann 2014-01-21 15:23:26 +01:00
parent 17c8de6560
commit 724c5baa70
1 changed files with 10 additions and 1 deletions

View File

@ -370,7 +370,16 @@ int main (int argc, char* argv[]) {
}
if (FileName != "-" && ! FileUtils::isRegularFile(FileName)) {
cerr << "Cannot open file '" << FileName << "'" << endl;
if (! FileUtils::exists(FileName)) {
cerr << "Cannot open file '" << FileName << "'. File not found." << endl;
}
else if (FileUtils::isDirectory(FileName)) {
cerr << "Specified file '" << FileName << "' is a directory. Please use a regular file." << endl;
}
else {
cerr << "Cannot open '" << FileName << "'. Invalid file type." << endl;
}
TRI_EXIT_FUNCTION(EXIT_FAILURE, NULL);
}