diff options
author | Mark Spruiell <mes@zeroc.com> | 2009-07-22 11:54:40 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2009-07-22 11:54:40 -0700 |
commit | 0d951bd52c2572f2d767f5bb97d7200b04248d8b (patch) | |
tree | 84e2f4f57735d12ce0b78f7e161b31c1962b0fbf /cpp/src/slice2java/Main.cpp | |
parent | bug 4167 - Java one-shot constructors (diff) | |
download | ice-0d951bd52c2572f2d767f5bb97d7200b04248d8b.tar.bz2 ice-0d951bd52c2572f2d767f5bb97d7200b04248d8b.tar.xz ice-0d951bd52c2572f2d767f5bb97d7200b04248d8b.zip |
bug 4115 - slice2java silent about file error
Diffstat (limited to 'cpp/src/slice2java/Main.cpp')
-rw-r--r-- | cpp/src/slice2java/Main.cpp | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/cpp/src/slice2java/Main.cpp b/cpp/src/slice2java/Main.cpp index ce6456193b7..9eb5cc6e1fc 100644 --- a/cpp/src/slice2java/Main.cpp +++ b/cpp/src/slice2java/Main.cpp @@ -254,7 +254,10 @@ compile(int argc, char* argv[]) if(cppHandle == 0) { - FileTracker::instance()->setOutput(os.str(), true); + if(listGenerated) + { + FileTracker::instance()->setOutput(os.str(), true); + } status = EXIT_FAILURE; break; } @@ -288,7 +291,10 @@ compile(int argc, char* argv[]) if(parseStatus == EXIT_FAILURE) { p->destroy(); - FileTracker::instance()->setOutput(os.str(), true); + if(listGenerated) + { + FileTracker::instance()->setOutput(os.str(), true); + } status = EXIT_FAILURE; } else @@ -317,7 +323,10 @@ compile(int argc, char* argv[]) ChecksumMap m = createChecksums(p); copy(m.begin(), m.end(), inserter(checksums, checksums.begin())); } - FileTracker::instance()->setOutput(os.str(), false); + if(listGenerated) + { + FileTracker::instance()->setOutput(os.str(), false); + } } catch(const Slice::FileException& ex) { @@ -326,8 +335,11 @@ compile(int argc, char* argv[]) // FileTracker::instance()->cleanup(); p->destroy(); - os << argv[0] << ": error: " << ex.reason() << endl; - FileTracker::instance()->setOutput(os.str(), true); + getErrorStream() << argv[0] << ": error: " << ex.reason() << endl; + if(listGenerated) + { + FileTracker::instance()->setOutput(os.str(), true); + } status = EXIT_FAILURE; break; } |