changeset 5872:a42f7dbe11c0

Orthanc will now fail to start when provided with a plugin path that can not be found
author Alain Mazy <am@orthanc.team>
date Mon, 18 Nov 2024 14:54:08 +0100
parents 3ed63202eff8
children c8788f8f5322
files NEWS OrthancServer/Plugins/Engine/PluginsManager.cpp
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/NEWS	Tue Nov 12 18:03:34 2024 +0100
+++ b/NEWS	Mon Nov 18 14:54:08 2024 +0100
@@ -30,6 +30,8 @@
 * Fix extremely rare error when 2 threads are trying to create the same folder in the File Storage 
   at the same time.
 * Fix crashes if handling very large images
+* Loading plugins:
+  - Orthanc will now fail to start when provided with a plugin path that can not be found.
 * Metrics:
   - fix a few metrics that were not published
   - added 2 metrics: orthanc_storage_cache_miss_count & orthanc_storage_cache_hit_count 
--- a/OrthancServer/Plugins/Engine/PluginsManager.cpp	Tue Nov 12 18:03:34 2024 +0100
+++ b/OrthancServer/Plugins/Engine/PluginsManager.cpp	Mon Nov 18 14:54:08 2024 +0100
@@ -244,8 +244,7 @@
   {
     if (!boost::filesystem::exists(path))
     {
-      LOG(ERROR) << "Inexistent path to plugins: " << path;
-      return;
+      throw OrthancException(ErrorCode_SharedLibrary, "Inexistent path to plugin: " + path);
     }
 
     if (boost::filesystem::is_directory(path))