# HG changeset patch # User Sebastien Jodogne # Date 1481895940 -3600 # Node ID 403d92d8df838826a1b3d31fc6a843078563adc8 # Parent 55843d0139d3a27d48e8e3039d8895e416b86ec3 cont diff -r 55843d0139d3 -r 403d92d8df83 Plugins/Samples/Common/DicomDatasetReader.cpp --- a/Plugins/Samples/Common/DicomDatasetReader.cpp Fri Dec 16 14:36:27 2016 +0100 +++ b/Plugins/Samples/Common/DicomDatasetReader.cpp Fri Dec 16 14:45:40 2016 +0100 @@ -32,7 +32,7 @@ #include "DicomDatasetReader.h" -#include "OrthancPluginCppWrapper.h" +#include "OrthancPluginException.h" #include @@ -73,7 +73,7 @@ { if (dataset == NULL) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_ParameterOutOfRange); + ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange); } } @@ -87,7 +87,7 @@ } else { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_InexistentTag); + ORTHANC_PLUGINS_THROW_EXCEPTION(InexistentTag); } } @@ -101,7 +101,7 @@ } catch (boost::bad_lexical_cast&) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } } @@ -116,7 +116,7 @@ } else { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_ParameterOutOfRange); + ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange); } } } diff -r 55843d0139d3 -r 403d92d8df83 Plugins/Samples/Common/DicomPath.cpp --- a/Plugins/Samples/Common/DicomPath.cpp Fri Dec 16 14:36:27 2016 +0100 +++ b/Plugins/Samples/Common/DicomPath.cpp Fri Dec 16 14:45:40 2016 +0100 @@ -32,7 +32,7 @@ #include "DicomPath.h" -#include "OrthancPluginCppWrapper.h" +#include "OrthancPluginException.h" namespace OrthancPlugins { @@ -40,7 +40,7 @@ { if (depth >= prefix_.size()) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_ParameterOutOfRange); + ORTHANC_PLUGINS_THROW_EXCEPTION(ParameterOutOfRange); } else { diff -r 55843d0139d3 -r 403d92d8df83 Plugins/Samples/Common/DicomTag.cpp --- a/Plugins/Samples/Common/DicomTag.cpp Fri Dec 16 14:36:27 2016 +0100 +++ b/Plugins/Samples/Common/DicomTag.cpp Fri Dec 16 14:45:40 2016 +0100 @@ -32,7 +32,7 @@ #include "DicomTag.h" -#include "OrthancPluginCppWrapper.h" +#include "OrthancPluginException.h" namespace OrthancPlugins { @@ -104,7 +104,7 @@ } else { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_NotImplemented); + ORTHANC_PLUGINS_THROW_EXCEPTION(NotImplemented); } } } diff -r 55843d0139d3 -r 403d92d8df83 Plugins/Samples/Common/FullOrthancDataset.cpp --- a/Plugins/Samples/Common/FullOrthancDataset.cpp Fri Dec 16 14:36:27 2016 +0100 +++ b/Plugins/Samples/Common/FullOrthancDataset.cpp Fri Dec 16 14:45:40 2016 +0100 @@ -32,7 +32,10 @@ #include "FullOrthancDataset.h" -#include "OrthancPluginCppWrapper.h" +#include "OrthancPluginException.h" + +#include +#include namespace OrthancPlugins { @@ -41,7 +44,7 @@ { if (dataset.type() != Json::objectValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } char name[16]; @@ -60,7 +63,7 @@ value["Name"].type() != Json::stringValue || value["Type"].type() != Json::stringValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } return &value; @@ -78,7 +81,7 @@ if (sequence["Type"].asString() != "Sequence" || value.type() != Json::arrayValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } else { @@ -99,7 +102,7 @@ if (tag["Type"].asString() != "String" || value.type() != Json::stringValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } else { @@ -142,7 +145,7 @@ { if (root_.type() != Json::objectValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } } diff -r 55843d0139d3 -r 403d92d8df83 Plugins/Samples/Common/IOrthancConnection.cpp --- a/Plugins/Samples/Common/IOrthancConnection.cpp Fri Dec 16 14:36:27 2016 +0100 +++ b/Plugins/Samples/Common/IOrthancConnection.cpp Fri Dec 16 14:45:40 2016 +0100 @@ -32,7 +32,7 @@ #include "IOrthancConnection.h" -#include "OrthancPluginCppWrapper.h" +#include "OrthancPluginException.h" #include @@ -45,7 +45,7 @@ if (!reader.parse(content, result)) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } } diff -r 55843d0139d3 -r 403d92d8df83 Plugins/Samples/Common/OrthancPluginConnection.cpp --- a/Plugins/Samples/Common/OrthancPluginConnection.cpp Fri Dec 16 14:36:27 2016 +0100 +++ b/Plugins/Samples/Common/OrthancPluginConnection.cpp Fri Dec 16 14:45:40 2016 +0100 @@ -47,7 +47,7 @@ } else { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_UnknownResource); + ORTHANC_PLUGINS_THROW_EXCEPTION(UnknownResource); } } @@ -64,7 +64,7 @@ } else { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_UnknownResource); + ORTHANC_PLUGINS_THROW_EXCEPTION(UnknownResource); } } @@ -81,7 +81,7 @@ } else { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_UnknownResource); + ORTHANC_PLUGINS_THROW_EXCEPTION(UnknownResource); } } @@ -92,7 +92,7 @@ if (!::OrthancPlugins::RestApiDelete(context_, uri, false)) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_UnknownResource); + ORTHANC_PLUGINS_THROW_EXCEPTION(UnknownResource); } } } diff -r 55843d0139d3 -r 403d92d8df83 Plugins/Samples/Common/SimplifiedOrthancDataset.cpp --- a/Plugins/Samples/Common/SimplifiedOrthancDataset.cpp Fri Dec 16 14:36:27 2016 +0100 +++ b/Plugins/Samples/Common/SimplifiedOrthancDataset.cpp Fri Dec 16 14:45:40 2016 +0100 @@ -32,7 +32,7 @@ #include "SimplifiedOrthancDataset.h" -#include "OrthancPluginCppWrapper.h" +#include "OrthancPluginException.h" namespace OrthancPlugins { @@ -45,7 +45,7 @@ const char* name = path.GetPrefixTag(depth).GetName(); if (content->type() != Json::objectValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } if (!content->isMember(name)) @@ -56,7 +56,7 @@ const Json::Value& sequence = (*content) [name]; if (sequence.type() != Json::arrayValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } size_t index = path.GetPrefixIndex(depth); @@ -74,7 +74,7 @@ if (content->type() != Json::objectValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } if (!content->isMember(name)) { @@ -91,7 +91,7 @@ { if (root_.type() != Json::objectValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } } @@ -122,7 +122,7 @@ } else if (value->type() != Json::stringValue) { - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } else { @@ -145,7 +145,7 @@ else if (sequence->type() != Json::arrayValue) { // Not a sequence - ORTHANC_PLUGINS_THROW_EXCEPTION(OrthancPluginErrorCode_BadFileFormat); + ORTHANC_PLUGINS_THROW_EXCEPTION(BadFileFormat); } else {