From fb57fe9da78a6f14ace0a7e3323e1354fa59cb15 Mon Sep 17 00:00:00 2001 From: Scott Giese Date: Sun, 15 Dec 2019 03:12:54 -0600 Subject: [PATCH] Catching an exception by value --- simgear/io/iostreams/zlibstream_test.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/io/iostreams/zlibstream_test.cxx b/simgear/io/iostreams/zlibstream_test.cxx index b62ec160..20ae1c10 100644 --- a/simgear/io/iostreams/zlibstream_test.cxx +++ b/simgear/io/iostreams/zlibstream_test.cxx @@ -431,7 +431,7 @@ void test_ZlibDecompressorIStream_readPutbackEtc() try { // 'Z' is not the last character read from the stream decompressor.putback('Z'); - } catch (std::ios_base::failure) { + } catch (const std::ios_base::failure&) { gotException = true; } catch (const std::exception& e) { // gcc fails to catch std::ios_base::failure due to an inconsistent C++11