40 if (fullName ==
"/dev/null") {
46 throw IOError(
TLF(
"Could not redirect to NUL device (%).", std::string(std::strerror(errno))));
57 throw IOError(
"Could not build output file '" + fullName +
"' (" + e.
what() +
").");
59 throw IOError(
"Could not build output file '" + fullName +
"' (" + e.
what() +
").");
62 myFileStream =
new std::ofstream(localName.c_str(), std::ios_base::out);
66 myFileStream =
new std::ofstream(localName.c_str(), std::ios_base::out);
70 throw IOError(
"Could not build output file '" + fullName +
"' (" + std::strerror(errno) +
").");
#define UNUSED_PARAMETER(x)
bool myAmNull
am I redirecting to /dev/null
std::ostream * myFileStream
The wrapped ofstream.
OutputDevice_File(const std::string &fullName, const bool compressed=false)
Constructor.
std::ostream & getOStream() override
Returns the associated ostream.
~OutputDevice_File()
Destructor.
Static storage of an output device and its base (abstract) implementation.
static std::string transcodeToLocal(const std::string &utf8String)
convert a string from UTF-8 to the local codepage
Exception class thrown by failed operations.
const char * what() const noexcept
Exception class thrown by failed zlib operations.