changeset 6899:4d044e9e0da1

more verbose NotImplemented errors
author Alain Mazy <am@orthanc.team>
date Mon, 01 Jun 2026 22:56:23 +0200
parents dcaa0166d015
children ce2494cb70ad b67b233343bd
files OrthancFramework/Sources/MetricsRegistry.cpp OrthancFramework/Sources/RestApi/RestApiOutput.cpp OrthancFramework/Sources/Toolbox.cpp OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp OrthancServer/Sources/Database/BaseCompatibilityTransaction.cpp OrthancServer/Sources/Database/Compatibility/GenericFind.cpp
diffstat 6 files changed, 12 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/MetricsRegistry.cpp	Mon Jun 01 22:31:59 2026 +0200
+++ b/OrthancFramework/Sources/MetricsRegistry.cpp	Mon Jun 01 22:56:23 2026 +0200
@@ -152,7 +152,7 @@
             }
             break;
           default:
-            throw OrthancException(ErrorCode_NotImplemented);
+            throw OrthancException(ErrorCode_NotImplemented, "Unsupported metrics policy");
         }
       }
 
@@ -179,7 +179,7 @@
             break;
 
           default:
-            throw OrthancException(ErrorCode_NotImplemented);
+            throw OrthancException(ErrorCode_NotImplemented, "Unsupported metrics policy");
         }
       }
 
--- a/OrthancFramework/Sources/RestApi/RestApiOutput.cpp	Mon Jun 01 22:31:59 2026 +0200
+++ b/OrthancFramework/Sources/RestApi/RestApiOutput.cpp	Mon Jun 01 22:56:23 2026 +0200
@@ -212,7 +212,7 @@
         value.find(";") != std::string::npos ||
         value.find(" ") != std::string::npos)
     {
-      throw OrthancException(ErrorCode_NotImplemented);
+      throw OrthancException(ErrorCode_NotImplemented, "Cookies may not contain space or semicolon");
     }
 
     CheckStatus();
--- a/OrthancFramework/Sources/Toolbox.cpp	Mon Jun 01 22:31:59 2026 +0200
+++ b/OrthancFramework/Sources/Toolbox.cpp	Mon Jun 01 22:56:23 2026 +0200
@@ -851,7 +851,7 @@
         return "GB2312";
 
       default:
-        throw OrthancException(ErrorCode_NotImplemented);
+        throw OrthancException(ErrorCode_NotImplemented, "Unsupported Boost locale encoding");
     }
   }
 #endif
--- a/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp	Mon Jun 01 22:31:59 2026 +0200
+++ b/OrthancServer/Plugins/Engine/OrthancPluginDatabaseV4.cpp	Mon Jun 01 22:56:23 2026 +0200
@@ -1597,7 +1597,7 @@
       }
       else
       {
-        throw OrthancException(ErrorCode_NotImplemented);
+        throw OrthancException(ErrorCode_NotImplemented, "No count support");
       }
     }
 
@@ -1823,7 +1823,7 @@
       }
       else
       {
-        throw OrthancException(ErrorCode_NotImplemented);
+        throw OrthancException(ErrorCode_NotImplemented, "No find support");
       }
     }
 
--- a/OrthancServer/Sources/Database/BaseCompatibilityTransaction.cpp	Mon Jun 01 22:31:59 2026 +0200
+++ b/OrthancServer/Sources/Database/BaseCompatibilityTransaction.cpp	Mon Jun 01 22:56:23 2026 +0200
@@ -32,7 +32,7 @@
                                                                 int64_t increment,
                                                                 bool shared)
   {
-    throw OrthancException(ErrorCode_NotImplemented);  // Not supported
+    throw OrthancException(ErrorCode_NotImplemented, "BaseCompatibilityTransaction::IncrementGlobalProperty");  // Not supported
   }
 
   void BaseCompatibilityTransaction::UpdateAndGetStatistics(int64_t& patientsCount,
@@ -42,7 +42,7 @@
                                                             int64_t& compressedSize,
                                                             int64_t& uncompressedSize)
   {
-    throw OrthancException(ErrorCode_NotImplemented);  // Not supported
+    throw OrthancException(ErrorCode_NotImplemented, "BaseCompatibilityTransaction::UpdateAndGetStatistics");  // Not supported
   }
 
   void BaseCompatibilityTransaction::GetChangesExtended(std::list<ServerIndexChange>& target /*out*/,
@@ -52,21 +52,21 @@
                                                         uint32_t limit,
                                                         const std::set<ChangeType>& filterType)
   {
-    throw OrthancException(ErrorCode_NotImplemented);  // Not supported
+    throw OrthancException(ErrorCode_NotImplemented, "BaseCompatibilityTransaction::GetChangesExtended");  // Not supported
   }
 
   void BaseCompatibilityTransaction::ExecuteCount(uint64_t& count,
                                                   const FindRequest& request,
                                                   const IDatabaseWrapper::Capabilities& capabilities)
   {
-    throw OrthancException(ErrorCode_NotImplemented);  // Not supported
+    throw OrthancException(ErrorCode_NotImplemented, "BaseCompatibilityTransaction::ExecuteCount");  // Not supported
   }
 
   void BaseCompatibilityTransaction::ExecuteFind(FindResponse& response,
                                                  const FindRequest& request,
                                                  const IDatabaseWrapper::Capabilities& capabilities)
   {
-    throw OrthancException(ErrorCode_NotImplemented);  // Not supported
+    throw OrthancException(ErrorCode_NotImplemented, "BaseCompatibilityTransaction::ExecuteFind");  // Not supported
   }
 
   void BaseCompatibilityTransaction::ExecuteFind(std::list<std::string>& identifiers,
--- a/OrthancServer/Sources/Database/Compatibility/GenericFind.cpp	Mon Jun 01 22:31:59 2026 +0200
+++ b/OrthancServer/Sources/Database/Compatibility/GenericFind.cpp	Mon Jun 01 22:56:23 2026 +0200
@@ -198,7 +198,7 @@
       }
       else
       {
-        throw OrthancException(ErrorCode_NotImplemented);
+        throw OrthancException(ErrorCode_NotImplemented, "ExecuteFind - unhandled request");
       }
     }