summaryrefslogtreecommitdiff
path: root/cpp/src/slice2freeze/Main.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2009-08-17 15:40:45 -0230
committerDwayne Boone <dwayne@zeroc.com>2009-08-17 15:40:45 -0230
commit604dfa65cf02b6b7d0ab9f8313c7335327e2704d (patch)
treede1669bd5913cf970b9738803010bbb5205e2c6e /cpp/src/slice2freeze/Main.cpp
parentSome updates for version change (diff)
downloadice-604dfa65cf02b6b7d0ab9f8313c7335327e2704d.tar.bz2
ice-604dfa65cf02b6b7d0ab9f8313c7335327e2704d.tar.xz
ice-604dfa65cf02b6b7d0ab9f8313c7335327e2704d.zip
More changes for 3996
Diffstat (limited to 'cpp/src/slice2freeze/Main.cpp')
-rw-r--r--cpp/src/slice2freeze/Main.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/cpp/src/slice2freeze/Main.cpp b/cpp/src/slice2freeze/Main.cpp
index 37e556d21a1..a49cbe64a4b 100644
--- a/cpp/src/slice2freeze/Main.cpp
+++ b/cpp/src/slice2freeze/Main.cpp
@@ -192,8 +192,8 @@ struct IndexType
void
usage(const char* n)
{
- cerr << "Usage: " << n << " [options] file-base [slice-files...]\n";
- cerr <<
+ getErrorStream() << "Usage: " << n << " [options] file-base [slice-files...]\n";
+ getErrorStream() <<
"Options:\n"
"-h, --help Show this message.\n"
"-v, --version Display the Ice version.\n"
@@ -1532,7 +1532,7 @@ compile(int argc, char* argv[])
}
catch(const IceUtilInternal::BadOptException& e)
{
- cerr << argv[0] << ": error: " << e.reason << endl;
+ getErrorStream() << argv[0] << ": error: " << e.reason << endl;
usage(argv[0]);
return EXIT_FAILURE;
}
@@ -1545,7 +1545,7 @@ compile(int argc, char* argv[])
if(opts.isSet("version"))
{
- cerr << ICE_STRING_VERSION << endl;
+ getErrorStream() << ICE_STRING_VERSION << endl;
return EXIT_SUCCESS;
}
@@ -2057,30 +2057,30 @@ main(int argc, char* argv[])
}
catch(const IceUtil::Exception& ex)
{
- cerr << ex.what() << endl;
+ getErrorStream() << argv[0] << ": error:" << ex.what() << endl;
#ifdef __GNUC__
- cerr << ex.ice_stackTrace() << endl;
+ getErrorStream() << ex.ice_stackTrace() << endl;
#endif
return EXIT_FAILURE;
}
catch(const std::exception& ex)
{
- cerr << ex.what() << endl;
+ getErrorStream() << argv[0] << ": error:" << ex.what() << endl;
return EXIT_FAILURE;
}
catch(const std::string& msg)
{
- cerr << msg << endl;
+ getErrorStream() << argv[0] << ": error:" << msg << endl;
return EXIT_FAILURE;
}
catch(const char* msg)
{
- cerr << msg << endl;
+ getErrorStream() << argv[0] << ": error:" << msg << endl;
return EXIT_FAILURE;
}
catch(...)
{
- cerr << "unknown exception" << endl;
+ getErrorStream() << argv[0] << ": error:" << "unknown exception" << endl;
return EXIT_FAILURE;
}
}