changeset 2959:7364415851ac

fix
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 04 Dec 2018 16:43:53 +0100
parents bb7a66efbeb1
children 74a5a7fd6e0e
files Plugins/Samples/Common/OrthancPluginCppWrapper.h
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Tue Dec 04 16:31:29 2018 +0100
+++ b/Plugins/Samples/Common/OrthancPluginCppWrapper.h	Tue Dec 04 16:43:53 2018 +0100
@@ -71,6 +71,12 @@
 #  define HAS_ORTHANC_PLUGIN_JOB    0
 #endif
 
+#if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 4, 3)
+#  define HAS_ORTHANC_PLUGIN_EXCEPTION_DETAILS  1
+#else
+#  define HAS_ORTHANC_PLUGIN_EXCEPTION_DETAILS  0
+#endif
+
 
 
 namespace OrthancPlugins
@@ -489,7 +495,7 @@
       }
       catch (ORTHANC_PLUGINS_EXCEPTION_CLASS& e)
       {
-#if HAS_ORTHANC_EXCEPTION == 1
+#if HAS_ORTHANC_EXCEPTION == 1 && HAS_ORTHANC_PLUGIN_EXCEPTION_DETAILS == 1
         if (HasGlobalContext() &&
             e.HasDetails())
         {