From f76d4d228b32e72c7de250cb37af264d38ee7e79 Mon Sep 17 00:00:00 2001 From: ljfa Date: Mon, 21 Sep 2015 10:21:17 +0200 Subject: Make close honor the exceptions mask --- src/io/ozlibstream.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/io/ozlibstream.cpp') diff --git a/src/io/ozlibstream.cpp b/src/io/ozlibstream.cpp index 605d1397d0..36c6b42d61 100644 --- a/src/io/ozlibstream.cpp +++ b/src/io/ozlibstream.cpp @@ -92,4 +92,18 @@ int deflate_streambuf::sync() return 0; } +void ozlibstream::close() +{ + try + { + buf.close(); + } + catch(...) + { + setstate(badbit); //FIXME: This will throw the wrong type of exception + //but there's no good way of setting the badbit + //without causing an exception when exceptions is set + } +} + } -- cgit 0.0.5-2-1-g0f52