Mercurial > hg > orthanc
comparison Core/Compression/ZlibCompressor.cpp @ 2954:d924f9bb61cc
taking advantage of details in OrthancException
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 03 Dec 2018 14:35:34 +0100 |
parents | 878b59270859 |
children | 4e43e67f8ecf |
comparison
equal
deleted
inserted
replaced
2953:210d5afd8f2b | 2954:d924f9bb61cc |
---|---|
115 return; | 115 return; |
116 } | 116 } |
117 | 117 |
118 if (!HasPrefixWithUncompressedSize()) | 118 if (!HasPrefixWithUncompressedSize()) |
119 { | 119 { |
120 LOG(ERROR) << "Cannot guess the uncompressed size of a zlib-encoded buffer"; | 120 throw OrthancException(ErrorCode_InternalError, |
121 throw OrthancException(ErrorCode_InternalError); | 121 "Cannot guess the uncompressed size of a zlib-encoded buffer"); |
122 } | 122 } |
123 | 123 |
124 uint64_t uncompressedSize = ReadUncompressedSizePrefix(compressed, compressedSize); | 124 uint64_t uncompressedSize = ReadUncompressedSizePrefix(compressed, compressedSize); |
125 | 125 |
126 try | 126 try |