From df0519bea5390ac8f3d9a0e168e2f799bd068985 Mon Sep 17 00:00:00 2001 From: YongDo-Hyun Date: Sat, 27 Dec 2025 01:06:26 +0300 Subject: feat: enhance error handling in ozlibstream and improve JSON escaping in json_formatter; add make_numeric_tag for cleaner tag creation Signed-off-by: YongDo-Hyun --- src/io/ozlibstream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/io') diff --git a/src/io/ozlibstream.cpp b/src/io/ozlibstream.cpp index b936219787..5f479f83f8 100644 --- a/src/io/ozlibstream.cpp +++ b/src/io/ozlibstream.cpp @@ -95,6 +95,7 @@ int deflate_streambuf::sync() void ozlibstream::close() { + std::ios_base::iostate old_ex = exceptions(); try { buf.close(); @@ -105,7 +106,6 @@ void ozlibstream::close() // `setstate` to throw an `ios_base::failure` which would replace // the original exception. Temporarily disable exceptions on this // stream, set the `badbit`, then restore the exception mask. - std::ios_base::iostate old_ex = exceptions(); try { exceptions(std::ios_base::goodbit); setstate(std::ios_base::badbit); -- cgit 0.0.5-2-1-g0f52