changeset 5436:6f2b11bfee8d

handle unknown exceptions in job registry unserialization
author Alain Mazy <am@osimis.io>
date Wed, 22 Nov 2023 09:38:57 +0100
parents 4be5f117aa0d
children 85da6dcd0e08
files OrthancServer/Sources/ServerContext.cpp
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancServer/Sources/ServerContext.cpp	Tue Nov 21 10:32:42 2023 +0100
+++ b/OrthancServer/Sources/ServerContext.cpp	Wed Nov 22 09:38:57 2023 +0100
@@ -285,6 +285,14 @@
         {
           LOG(WARNING) << "Cannot unserialize the jobs engine, starting anyway: " << e.What();
         }
+        catch (const std::string& s) 
+        {
+          LOG(WARNING) << "Cannot unserialize the jobs engine, starting anyway: \"" << s << "\"";
+        }
+        catch (...)
+        {
+          LOG(WARNING) << "Cannot unserialize the jobs engine, starting anyway";
+        }
       }
       else
       {