From 724c5baa7010928dcc3163669f193738a8706472 Mon Sep 17 00:00:00 2001 From: Jan Steemann Date: Tue, 21 Jan 2014 15:23:26 +0100 Subject: [PATCH] issue #737: adjusted error message --- arangosh/V8Client/arangoimp.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/arangosh/V8Client/arangoimp.cpp b/arangosh/V8Client/arangoimp.cpp index c38d5fd751..928ec23f8f 100644 --- a/arangosh/V8Client/arangoimp.cpp +++ b/arangosh/V8Client/arangoimp.cpp @@ -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); }