Mercurial > hg > orthanc
diff Plugins/Engine/PluginsErrorDictionary.h @ 1645:1558b3226b18
IHttpExceptionFormatter
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Sep 2015 15:55:17 +0200 |
parents | 939b921b2c81 |
children | 8040d56cb0b3 |
line wrap: on
line diff
--- a/Plugins/Engine/PluginsErrorDictionary.h Wed Sep 23 22:05:27 2015 +0200 +++ b/Plugins/Engine/PluginsErrorDictionary.h Thu Sep 24 15:55:17 2015 +0200 @@ -36,7 +36,6 @@ #include "../Include/orthanc/OrthancCPlugin.h" #include "../../Core/OrthancException.h" -#include "SharedLibrary.h" #include <map> #include <string> @@ -52,10 +51,10 @@ private: struct Error { + std::string pluginName_; int32_t pluginCode_; + HttpStatus httpStatus_; std::string description_; - HttpStatus httpStatus_; - std::string pluginName_; }; typedef std::map<int32_t, Error*> Errors; @@ -69,14 +68,14 @@ ~PluginsErrorDictionary(); - OrthancPluginErrorCode Register(SharedLibrary& library, + OrthancPluginErrorCode Register(const std::string& pluginName, int32_t pluginCode, - const char* description, - uint16_t httpStatus); + uint16_t httpStatus, + const char* description); - void GetExceptionMessage(Json::Value& message, /* out */ - HttpStatus& httpStatus, /* out */ - const OrthancException& exception); + bool Format(Json::Value& message, /* out */ + HttpStatus& httpStatus, /* out */ + const OrthancException& exception); }; }