Catching an exception by value

This commit is contained in:
Scott Giese
2019-12-15 03:12:54 -06:00
parent 02496da4d2
commit fb57fe9da7

View File

@@ -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