diff OrthancServer/main.cpp @ 1245:aea9277dee75

catch more exceptions (patch from Valdas Rapsevicius)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Dec 2014 12:42:50 +0100
parents f1c01451a8ee
children 32fcc5dc7562
line wrap: on
line diff
--- a/OrthancServer/main.cpp	Mon Dec 08 12:31:35 2014 +0100
+++ b/OrthancServer/main.cpp	Mon Dec 08 12:42:50 2014 +0100
@@ -695,11 +695,21 @@
       }
     }
   }
-  catch (OrthancException& e)
+  catch (const OrthancException& e)
   {
     LOG(ERROR) << "Uncaught exception, stopping now: [" << e.What() << "]";
     status = -1;
   }
+  catch (const std::exception& e) 
+  {
+    LOG(ERROR) << "Uncaught exception, stopping now: [" << e.what() << "]";
+    status = -1;
+  }
+  catch (const std::string& s) 
+  {
+    LOG(ERROR) << "Uncaught exception, stopping now: [" << s << "]";
+    status = -1;
+  }
   catch (...)
   {
     LOG(ERROR) << "Native exception, stopping now. Check your plugins, if any.";