Mercurial > hg > orthanc
changeset 6673:96fb0e7d75ba
fix debug message
| author | Alain Mazy <am@orthanc.team> |
|---|---|
| date | Fri, 03 Apr 2026 15:59:27 +0200 |
| parents | 80ef5859b6e2 |
| children | 35a5e25034f4 |
| files | OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp OrthancFramework/Sources/Images/PamReader.cpp |
| diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp Fri Apr 03 15:23:12 2026 +0200 +++ b/OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp Fri Apr 03 15:59:27 2026 +0200 @@ -488,7 +488,9 @@ if (totalFrameSize > MAX_FRAME_SIZE || static_cast<uint64_t>(static_cast<size_t>(totalFrameSize)) != totalFrameSize) { - throw OrthancException(ErrorCode_BadFileFormat, "DICOM Frame size overflow (" + boost::lexical_cast<std::string>(totalFrameSize) + " vs " + boost::lexical_cast<std::string>(MAX_FRAME_SIZE) + ")"); + std::ostringstream errorMessage; + errorMessage << "DICOM Frame size overflow (" << totalFrameSize << " vs " << MAX_FRAME_SIZE << ")"; + throw OrthancException(ErrorCode_BadFileFormat, errorMessage.str()); } else {
--- a/OrthancFramework/Sources/Images/PamReader.cpp Fri Apr 03 15:23:12 2026 +0200 +++ b/OrthancFramework/Sources/Images/PamReader.cpp Fri Apr 03 15:59:27 2026 +0200 @@ -202,7 +202,9 @@ if (totalSize > MAX_PAM_IMAGE_BUFFER_SIZE || static_cast<uint64_t>(static_cast<size_t>(totalSize)) != totalSize) { - throw OrthancException(ErrorCode_BadFileFormat, "PAM image too large (" + boost::lexical_cast<std::string>(totalSize) + " vs " + boost::lexical_cast<std::string>(MAX_PAM_IMAGE_BUFFER_SIZE) + ")"); + std::ostringstream errorMessage; + errorMessage << "PAM image too large (" << totalSize << " vs " << MAX_PAM_IMAGE_BUFFER_SIZE << ")"; + throw OrthancException(ErrorCode_BadFileFormat, errorMessage.str()); } if (content_.size() != header.size() + headerDelimiter.size() + pitch * height)
