changeset 6585:63cf1a09fa90

fix
author Alain Mazy <am@orthanc.team>
date Thu, 12 Feb 2026 08:45:35 +0100
parents 7a51327f5432
children 56eb61c86f93
files OrthancServer/Plugins/Samples/Common/OrthancPluginCppWrapper.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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<size_t>(std::numeric_limits<uint32_t>::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(),