diff options
author | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-08-07 05:01:24 +0300 |
---|---|---|
committer | Ulrich Germann <Ulrich.Germann@gmail.com> | 2015-08-07 05:01:24 +0300 |
commit | d11906abcdc43c6e5d41ff75d99b91c654a49daf (patch) | |
tree | 00b7641b1c47c25ba15913bd646ce1d678e885ce /moses/OutputCollector.h | |
parent | 4ad6f2a5a6fc860bd889edff23e9b05c1a38a83e (diff) |
Code simplification in IOWrapper.
Diffstat (limited to 'moses/OutputCollector.h')
-rw-r--r-- | moses/OutputCollector.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/moses/OutputCollector.h b/moses/OutputCollector.h index 71bc90369..d66c16f20 100644 --- a/moses/OutputCollector.h +++ b/moses/OutputCollector.h @@ -33,7 +33,8 @@ #include <map> #include <ostream> #include <string> - +#include "Util.h" +#include "util/exception.hh" namespace Moses { /** @@ -60,8 +61,8 @@ public: m_isHoldingOutputStream = false; } else if (xout.size() && xout != "/dev/stdout" && xout != "-") { m_outStream = new std::ofstream(xout.c_str()); - UTIL_THROW_IF2(!m_outputStream->good(), "Failed to open output file" - << xout << std::endl); + UTIL_THROW_IF2(!m_outStream->good(), "Failed to open output file" + << xout); m_isHoldingOutputStream = true; } else { m_outStream = &std::cout; @@ -74,7 +75,7 @@ public: } else if (xerr.size() && xerr != "/dev/stderr") { m_debugStream = new std::ofstream(xerr.c_str()); UTIL_THROW_IF2(!m_debugStream->good(), "Failed to open debug stream" - << xerr << std::endl); + << xerr); m_isHoldingDebugStream = true; } else { m_debugStream = &std::cerr; |