# HG changeset patch # User Alain Mazy # Date 1775224767 -7200 # Node ID 96fb0e7d75ba84341801c4f738f2ed1892cbea0e # Parent 80ef5859b6e23d203eac2e5f66ccb21c56129f58 fix debug message diff -r 80ef5859b6e2 -r 96fb0e7d75ba OrthancFramework/Sources/DicomFormat/DicomImageInformation.cpp --- 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(static_cast(totalFrameSize)) != totalFrameSize) { - throw OrthancException(ErrorCode_BadFileFormat, "DICOM Frame size overflow (" + boost::lexical_cast(totalFrameSize) + " vs " + boost::lexical_cast(MAX_FRAME_SIZE) + ")"); + std::ostringstream errorMessage; + errorMessage << "DICOM Frame size overflow (" << totalFrameSize << " vs " << MAX_FRAME_SIZE << ")"; + throw OrthancException(ErrorCode_BadFileFormat, errorMessage.str()); } else { diff -r 80ef5859b6e2 -r 96fb0e7d75ba OrthancFramework/Sources/Images/PamReader.cpp --- 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(static_cast(totalSize)) != totalSize) { - throw OrthancException(ErrorCode_BadFileFormat, "PAM image too large (" + boost::lexical_cast(totalSize) + " vs " + boost::lexical_cast(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)