summaryrefslogtreecommitdiff
path: root/cpp/src/slice2html/Main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/slice2html/Main.cpp')
-rw-r--r--cpp/src/slice2html/Main.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/cpp/src/slice2html/Main.cpp b/cpp/src/slice2html/Main.cpp
index dad5663fdba..a939d6c8b67 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>
@@ -84,11 +85,14 @@ main(int argc, char* argv[])
vector<string> args;
try
{
+#if defined(__BCPLUSPLUS__) && (__BCPLUSPLUS__ >= 0x0600)
+ IceUtil::DummyBCC dummy;
+#endif
args = opts.parse(argc, (const 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 +149,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 +170,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 +183,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 +251,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;
}
}