changeset 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 a0e420c5f2b8
children 54bf0f0245f4
files OrthancServer/main.cpp
diffstat 1 files changed, 11 insertions(+), 1 deletions(-) [+]
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.";