changeset 114:628697fdfcbd

additional catch
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 07 Dec 2015 16:19:22 +0100
parents 1dccd526d799
children c8ca47a67bf3
files Plugin/Plugin.cpp
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/Plugin/Plugin.cpp	Wed Dec 02 17:05:57 2015 +0100
+++ b/Plugin/Plugin.cpp	Mon Dec 07 16:19:22 2015 +0100
@@ -345,6 +345,14 @@
 
     return OrthancPluginErrorCode_Success;
   }
+  catch (Orthanc::OrthancException& e)
+  {
+    *target = NULL;
+
+    std::string s = "Cannot decode image using GDCM: " + std::string(e.What());
+    OrthancPluginLogError(context_, s.c_str());
+    return OrthancPluginErrorCode_Plugin;
+  }
   catch (std::runtime_error& e)
   {
     *target = NULL;