diff options
| author | ljfa <ljfa-ag@web.de> | 2015-09-21 10:21:17 +0200 |
|---|---|---|
| committer | ljfa <ljfa-ag@web.de> | 2015-09-21 10:21:17 +0200 |
| commit | f76d4d228b32e72c7de250cb37af264d38ee7e79 (patch) | |
| tree | 5cf26b787a73a45f42198e957da19946b0e0ea85 /src | |
| parent | 28d735a3261e831f0c65cfe035e0aa53e369b964 (diff) | |
| download | Project-Tick-f76d4d228b32e72c7de250cb37af264d38ee7e79.tar.gz Project-Tick-f76d4d228b32e72c7de250cb37af264d38ee7e79.zip | |
Make close honor the exceptions mask
Diffstat (limited to 'src')
| -rw-r--r-- | src/io/ozlibstream.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 + } +} + } |
