Mercurial > hg > orthanc
comparison Plugins/Samples/Common/OrthancPluginCppWrapper.h @ 2959:7364415851ac
fix
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 04 Dec 2018 16:43:53 +0100 |
parents | bb7a66efbeb1 |
children | 3ed449d0204d |
comparison
equal
deleted
inserted
replaced
2958:bb7a66efbeb1 | 2959:7364415851ac |
---|---|
69 #else | 69 #else |
70 # define HAS_ORTHANC_PLUGIN_PEERS 0 | 70 # define HAS_ORTHANC_PLUGIN_PEERS 0 |
71 # define HAS_ORTHANC_PLUGIN_JOB 0 | 71 # define HAS_ORTHANC_PLUGIN_JOB 0 |
72 #endif | 72 #endif |
73 | 73 |
74 #if ORTHANC_PLUGINS_VERSION_IS_ABOVE(1, 4, 3) | |
75 # define HAS_ORTHANC_PLUGIN_EXCEPTION_DETAILS 1 | |
76 #else | |
77 # define HAS_ORTHANC_PLUGIN_EXCEPTION_DETAILS 0 | |
78 #endif | |
79 | |
74 | 80 |
75 | 81 |
76 namespace OrthancPlugins | 82 namespace OrthancPlugins |
77 { | 83 { |
78 typedef void (*RestCallback) (OrthancPluginRestOutput* output, | 84 typedef void (*RestCallback) (OrthancPluginRestOutput* output, |
487 Callback(output, url, request); | 493 Callback(output, url, request); |
488 return OrthancPluginErrorCode_Success; | 494 return OrthancPluginErrorCode_Success; |
489 } | 495 } |
490 catch (ORTHANC_PLUGINS_EXCEPTION_CLASS& e) | 496 catch (ORTHANC_PLUGINS_EXCEPTION_CLASS& e) |
491 { | 497 { |
492 #if HAS_ORTHANC_EXCEPTION == 1 | 498 #if HAS_ORTHANC_EXCEPTION == 1 && HAS_ORTHANC_PLUGIN_EXCEPTION_DETAILS == 1 |
493 if (HasGlobalContext() && | 499 if (HasGlobalContext() && |
494 e.HasDetails()) | 500 e.HasDetails()) |
495 { | 501 { |
496 OrthancPluginSetHttpErrorDetails(GetGlobalContext(), output, e.GetDetails()); | 502 OrthancPluginSetHttpErrorDetails(GetGlobalContext(), output, e.GetDetails()); |
497 } | 503 } |