# HG changeset patch # User Alain Mazy # Date 1770882335 -3600 # Node ID 63cf1a09fa9058acd1257c32ba78a0e8ec825ca5 # Parent 7a51327f5432c0a2c5310617778c60875c4f43eb fix diff -r 7a51327f5432 -r 63cf1a09fa90 OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp --- a/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Wed Feb 11 16:34:27 2026 +0100 +++ b/OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp Thu Feb 12 08:45:35 2026 +0100 @@ -1571,7 +1571,12 @@ { if (answer.size() > static_cast(std::numeric_limits::max())) { + #if HAS_ORTHANC_EXCEPTION == 1 throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange, "Cannot send HTTP response larger than 4GB"); + #else + ORTHANC_PLUGINS_LOG_ERROR("Cannot send HTTP response larger than 4GB"); + ORTHANC_PLUGINS_THROW_PLUGIN_ERROR_CODE(OrthancPluginErrorCode_ParameterOutOfRange); + #endif } OrthancPluginSetHttpHeader(GetGlobalContext(),