diff options
Diffstat (limited to 'cpp/src/slice2html/Main.cpp')
-rw-r--r-- | cpp/src/slice2html/Main.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp index dad5663fdba..0b7557506fd 100644 --- a/cpp/src/slice2html/Main.cpp +++ b/cpp/src/slice2html/Main.cpp @@ -12,6 +12,7 @@ #include <IceUtil/StaticMutex.h> #include <Slice/Preprocessor.h> #include <Slice/FileTracker.h> +#include <Slice/Util.h> #include <Gen.h> #include <stdlib.h> @@ -88,7 +89,7 @@ main(int argc, char* argv[]) } catch(const IceUtilInternal::BadOptException& e) { - cerr << argv[0] << ": " << e.reason << endl; + cerr << argv[0] << ": error: " << e.reason << endl; usage(argv[0]); return EXIT_FAILURE; } @@ -145,7 +146,8 @@ main(int argc, char* argv[]) s >> indexCount; if(!s) { - cerr << argv[0] << ": the --index operation requires a positive integer argument" << endl; + getErrorStream() << argv[0] << ": error: the --index operation requires a positive integer argument" + << endl; usage(argv[0]); return EXIT_FAILURE; } @@ -165,7 +167,8 @@ main(int argc, char* argv[]) s >> summaryCount; if(!s) { - cerr << argv[0] << ": the --summary operation requires a positive integer argument" << endl; + getErrorStream() << argv[0] << ": error: the --summary operation requires a positive integer argument" + << endl; usage(argv[0]); return EXIT_FAILURE; } @@ -177,7 +180,7 @@ main(int argc, char* argv[]) if(args.empty()) { - cerr << argv[0] << ": no input file" << endl; + getErrorStream() << argv[0] << ": error: no input file" << endl; usage(argv[0]); return EXIT_FAILURE; } @@ -245,19 +248,19 @@ main(int argc, char* argv[]) // created files. FileTracker::instance()->cleanup(); p->destroy(); - cerr << argv[0] << ": " << ex.reason() << endl; + getErrorStream() << argv[0] << ": error: " << ex.reason() << endl; return EXIT_FAILURE; } catch(const string& err) { FileTracker::instance()->cleanup(); - cerr << argv[0] << ": " << err << endl; + getErrorStream() << argv[0] << ": error: " << err << endl; status = EXIT_FAILURE; } catch(const char* err) { FileTracker::instance()->cleanup(); - cerr << argv[0] << ": " << err << endl; + getErrorStream() << argv[0] << ": error: " << err << endl; status = EXIT_FAILURE; } } |