diff Plugins/Engine/PluginsErrorDictionary.h @ 1649:8040d56cb0b3

New function "OrthancPluginRegisterErrorCode()" to declare custom error codes
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 25 Sep 2015 16:24:13 +0200
parents 1558b3226b18
children 9f34ebfaf2c9
line wrap: on
line diff
--- a/Plugins/Engine/PluginsErrorDictionary.h	Fri Sep 25 11:33:55 2015 +0200
+++ b/Plugins/Engine/PluginsErrorDictionary.h	Fri Sep 25 16:24:13 2015 +0200
@@ -36,6 +36,7 @@
 
 #include "../Include/orthanc/OrthancCPlugin.h"
 #include "../../Core/OrthancException.h"
+#include "SharedLibrary.h"
 
 #include <map>
 #include <string>
@@ -54,7 +55,7 @@
       std::string  pluginName_;
       int32_t      pluginCode_;
       HttpStatus   httpStatus_;
-      std::string  description_;
+      std::string  message_;
     };
     
     typedef std::map<int32_t, Error*>  Errors;
@@ -68,12 +69,12 @@
 
     ~PluginsErrorDictionary();
 
-    OrthancPluginErrorCode  Register(const std::string& pluginName,
+    OrthancPluginErrorCode  Register(SharedLibrary& library,
                                      int32_t  pluginCode,
                                      uint16_t httpStatus,
-                                     const char* description);
+                                     const char* message);
 
-    bool  Format(Json::Value& message,  /* out */
+    bool  Format(Json::Value& message,    /* out */
                  HttpStatus& httpStatus,  /* out */
                  const OrthancException& exception);
   };