Mercurial > hg > orthanc
diff Core/DicomParsing/Internals/DicomImageDecoder.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 | 52217dc47a4e |
children | 4e43e67f8ecf |
line wrap: on
line diff
--- a/Core/DicomParsing/Internals/DicomImageDecoder.cpp Mon Dec 03 11:49:39 2018 +0100 +++ b/Core/DicomParsing/Internals/DicomImageDecoder.cpp Mon Dec 03 14:35:34 2018 +0100 @@ -633,8 +633,8 @@ &dataset, frame, startFragment, &uncompressed[0], uncompressed.size(), decompressedColorModel).good()) { - LOG(ERROR) << "Cannot decode a palette image"; - throw OrthancException(ErrorCode_BadFileFormat); + throw OrthancException(ErrorCode_BadFileFormat, + "Cannot decode a palette image"); } return DecodeLookupTable(target, info, dataset, @@ -648,8 +648,8 @@ &dataset, frame, startFragment, target->GetBuffer(), target->GetSize(), decompressedColorModel).good()) { - LOG(ERROR) << "Cannot decode a non-palette image"; - throw OrthancException(ErrorCode_BadFileFormat); + throw OrthancException(ErrorCode_BadFileFormat, + "Cannot decode a non-palette image"); } return target.release(); @@ -806,8 +806,8 @@ } } - LOG(ERROR) << "Cannot decode a DICOM image with the built-in decoder"; - throw OrthancException(ErrorCode_BadFileFormat); + throw OrthancException(ErrorCode_BadFileFormat, + "Cannot decode a DICOM image with the built-in decoder"); }