diff options
author | Jack Lloyd <[email protected]> | 2015-12-19 16:09:17 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-19 16:09:17 -0500 |
commit | 0fae1884079518e4f6d1c049cc7f341cd96c8a65 (patch) | |
tree | 41e3a8aea10b7381c0e2cfd4ee019745215876ac /src/lib/compression/lzma | |
parent | b3da432772628fdb3eed9cf5dabb54eda0097d2b (diff) |
Remove all remaining uses of throwing a std:: exception directly
See GH #340 and 6b9a3a5 for background
Diffstat (limited to 'src/lib/compression/lzma')
-rw-r--r-- | src/lib/compression/lzma/lzma.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/compression/lzma/lzma.cpp b/src/lib/compression/lzma/lzma.cpp index 6e5217767..5998d1c8c 100644 --- a/src/lib/compression/lzma/lzma.cpp +++ b/src/lib/compression/lzma/lzma.cpp @@ -41,7 +41,7 @@ class LZMA_Stream : public Zlib_Style_Stream<lzma_stream, byte> lzma_ret rc = ::lzma_code(streamp(), static_cast<lzma_action>(flags)); if(rc == LZMA_MEM_ERROR) - throw std::bad_alloc(); + throw Exception("lzma memory allocation failed"); else if (rc != LZMA_OK && rc != LZMA_STREAM_END) throw Exception("Lzma error"); @@ -61,7 +61,7 @@ class LZMA_Compression_Stream : public LZMA_Stream lzma_ret rc = ::lzma_easy_encoder(streamp(), level, LZMA_CHECK_CRC64); if(rc == LZMA_MEM_ERROR) - throw std::bad_alloc(); + throw Exception("lzma memory allocation failed"); else if(rc != LZMA_OK) throw Exception("lzma compress initialization failed"); } @@ -76,7 +76,7 @@ class LZMA_Decompression_Stream : public LZMA_Stream LZMA_TELL_UNSUPPORTED_CHECK); if(rc == LZMA_MEM_ERROR) - throw std::bad_alloc(); + throw Exception("lzma memory allocation failed"); else if(rc != LZMA_OK) throw Exception("Bad setting in lzma_stream_decoder"); } |