Catching an exception by value
This commit is contained in:
@@ -431,7 +431,7 @@ void test_ZlibDecompressorIStream_readPutbackEtc()
|
|||||||
try {
|
try {
|
||||||
// 'Z' is not the last character read from the stream
|
// 'Z' is not the last character read from the stream
|
||||||
decompressor.putback('Z');
|
decompressor.putback('Z');
|
||||||
} catch (std::ios_base::failure) {
|
} catch (const std::ios_base::failure&) {
|
||||||
gotException = true;
|
gotException = true;
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
// gcc fails to catch std::ios_base::failure due to an inconsistent C++11
|
// gcc fails to catch std::ios_base::failure due to an inconsistent C++11
|
||||||
|
|||||||
Reference in New Issue
Block a user