Mercurial > hg > orthanc-dicomweb
changeset 73:bfa7ed27ede9
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 20 Oct 2015 17:47:12 +0200 |
parents | 92a1a515d52e (diff) baa8c09df4c6 (current diff) |
children | c735628b9ae7 |
files | Orthanc/Core/Enumerations.cpp Orthanc/Core/Enumerations.h Resources/SyncOrthancFolder.py |
diffstat | 3 files changed, 21 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/Orthanc/Core/Enumerations.cpp Fri Oct 09 18:33:53 2015 +0200 +++ b/Orthanc/Core/Enumerations.cpp Tue Oct 20 17:47:12 2015 +0200 @@ -44,11 +44,6 @@ // "Resources/GenerateErrorCodes.py" const char* EnumerationToString(ErrorCode error) { - if (error >= ErrorCode_START_PLUGINS) - { - return "Error encountered within some plugin"; - } - switch (error) { case ErrorCode_InternalError: @@ -318,8 +313,21 @@ case ErrorCode_DatabaseNotInitialized: return "Plugin trying to call the database during its initialization"; + case ErrorCode_SslDisabled: + return "Orthanc has been built without SSL support"; + + case ErrorCode_CannotOrderSlices: + return "Unable to order the slices of the series"; + default: - return "Unknown error code"; + if (error >= ErrorCode_START_PLUGINS) + { + return "Error encountered within some plugin"; + } + else + { + return "Unknown error code"; + } } }
--- a/Orthanc/Core/Enumerations.h Fri Oct 09 18:33:53 2015 +0200 +++ b/Orthanc/Core/Enumerations.h Tue Oct 20 17:47:12 2015 +0200 @@ -134,6 +134,8 @@ ErrorCode_StorageAreaAlreadyRegistered = 2036 /*!< Another plugin has already registered a custom storage area */, ErrorCode_DatabaseBackendAlreadyRegistered = 2037 /*!< Another plugin has already registered a custom database back-end */, ErrorCode_DatabaseNotInitialized = 2038 /*!< Plugin trying to call the database during its initialization */, + ErrorCode_SslDisabled = 2039 /*!< Orthanc has been built without SSL support */, + ErrorCode_CannotOrderSlices = 2040 /*!< Unable to order the slices of the series */, ErrorCode_START_PLUGINS = 1000000 };
--- a/Plugin/Configuration.h Fri Oct 09 18:33:53 2015 +0200 +++ b/Plugin/Configuration.h Tue Oct 20 17:47:12 2015 +0200 @@ -23,14 +23,14 @@ #include <orthanc/OrthancCPlugin.h> #include <json/value.h> -#if (ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER >= 9 && ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER >= 5) +#if (ORTHANC_PLUGINS_MINIMAL_MAJOR_NUMBER <= 0 && ORTHANC_PLUGINS_MINIMAL_MINOR_NUMBER <= 9 && ORTHANC_PLUGINS_MINIMAL_REVISION_NUMBER <= 4) +# define REST_RETURN_TYPE int32_t +# define REST_RETURN_SUCCESS 0 +# define REST_RETURN_FAILURE -1 +#else # define REST_RETURN_TYPE OrthancPluginErrorCode # define REST_RETURN_SUCCESS OrthancPluginErrorCode_Success # define REST_RETURN_FAILURE OrthancPluginErrorCode_Plugin -#else -# define REST_RETURN_TYPE int32_t -# define REST_RETURN_SUCCESS 0 -# define REST_RETURN_FAILURE -1 #endif