Mercurial > hg > orthanc
diff Core/Compression/DeflateBaseCompressor.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 |
line wrap: on
line diff
--- a/Core/Compression/DeflateBaseCompressor.cpp Mon Dec 03 11:49:39 2018 +0100 +++ b/Core/Compression/DeflateBaseCompressor.cpp Mon Dec 03 14:35:34 2018 +0100 @@ -45,8 +45,8 @@ { if (level >= 10) { - LOG(ERROR) << "Zlib compression level must be between 0 (no compression) and 9 (highest compression)"; - throw OrthancException(ErrorCode_ParameterOutOfRange); + throw OrthancException(ErrorCode_ParameterOutOfRange, + "Zlib compression level must be between 0 (no compression) and 9 (highest compression)"); } compressionLevel_ = level; @@ -63,8 +63,7 @@ if (compressedSize < sizeof(uint64_t)) { - LOG(ERROR) << "The compressed buffer is ill-formed"; - throw OrthancException(ErrorCode_CorruptedFile); + throw OrthancException(ErrorCode_CorruptedFile, "The compressed buffer is ill-formed"); } uint64_t size;