summaryrefslogtreecommitdiff
path: root/cpp/src/slice2docbook/Main.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2009-02-02 10:15:06 -0800
committerMark Spruiell <mes@zeroc.com>2009-02-02 10:15:06 -0800
commitc1ce7caa97b3dd6f7536d5c3b8b482d823c51891 (patch)
tree85be09ca58cee5a9dffa27cbcf3ce67a0d2b25f2 /cpp/src/slice2docbook/Main.cpp
parentRemoved old makedist scripts (diff)
downloadice-c1ce7caa97b3dd6f7536d5c3b8b482d823c51891.tar.bz2
ice-c1ce7caa97b3dd6f7536d5c3b8b482d823c51891.tar.xz
ice-c1ce7caa97b3dd6f7536d5c3b8b482d823c51891.zip
bug 3644 - improve integration between eclipse plugin and translator
bug 3657 - improve error reporting in translators
Diffstat (limited to 'cpp/src/slice2docbook/Main.cpp')
-rw-r--r--cpp/src/slice2docbook/Main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/cpp/src/slice2docbook/Main.cpp b/cpp/src/slice2docbook/Main.cpp
index b5616743174..566238a9db4 100644
--- a/cpp/src/slice2docbook/Main.cpp
+++ b/cpp/src/slice2docbook/Main.cpp
@@ -13,6 +13,7 @@
#include <IceUtil/StaticMutex.h>
#include <Slice/Preprocessor.h>
#include <Slice/FileTracker.h>
+#include <Slice/Util.h>
#include <Gen.h>
using namespace std;
@@ -79,7 +80,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;
}
@@ -134,7 +135,7 @@ main(int argc, char* argv[])
if(args.empty())
{
- cerr << argv[0] << ": no docbook file specified" << endl;
+ getErrorStream() << argv[0] << ": error: no docbook file specified" << endl;
usage(argv[0]);
return EXIT_FAILURE;
}
@@ -148,13 +149,13 @@ main(int argc, char* argv[])
}
if(suffix != ".sgml")
{
- cerr << argv[0] << ": docbook file must end with `.sgml'" << endl;
+ getErrorStream() << argv[0] << ": error: docbook file must end with `.sgml'" << endl;
return EXIT_FAILURE;
}
if(args.size() < 2)
{
- cerr << argv[0] << ": no input file" << endl;
+ getErrorStream() << argv[0] << ": error: no input file" << endl;
usage(argv[0]);
return EXIT_FAILURE;
}
@@ -222,7 +223,7 @@ main(int argc, char* argv[])
// cleanup any created files.
FileTracker::instance()->cleanup();
p->destroy();
- cerr << argv[0] << ": " << ex.reason() << endl;
+ getErrorStream() << argv[0] << ": error: " << ex.reason() << endl;
return EXIT_FAILURE;
}
}