#ifdef WITH_ZLIB
#include <zlib.h>
#endif
+#include <msp/core/except.h>
#include "zlibcompressed.h"
using namespace std;
ZlibCompressed::Private::Private()
{
#ifdef WITH_ZLIB
- stream.zalloc = 0;
- stream.zfree = 0;
- stream.opaque = 0;
+ stream.zalloc = nullptr;
+ stream.zfree = nullptr;
+ stream.opaque = nullptr;
#endif
}
(void)buffer_size;
(void)stream_end;
(void)level;
- throw zlib_error("unsupported", -1);
+ throw unsupported("ZlibCompressed");
#endif
}
void ZlibCompressed::set_block(bool)
{
- throw logic_error("ZlibCompressed::set_block");
+ throw unsupported("ZlibCompressed::set_block");
}
void ZlibCompressed::set_inherit(bool)
{
- throw logic_error("ZlibCompressed::set_inherit");
+ throw unsupported("ZlibCompressed::set_inherit");
}
void ZlibCompressed::flush()
const Handle &ZlibCompressed::get_handle(Mode)
{
- throw logic_error("ZlibCompressed::get_handle");
+ throw unsupported("ZlibCompressed::get_handle");
}
} // namespace IO