diff Resources/Orthanc/Plugins/Samples/Common/FullOrthancDataset.cpp @ 86:319b8c45c231

sync
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 16 Dec 2016 14:55:19 +0100
parents 147bd6dc28db
children ff0ef01c332c
line wrap: on
line diff
--- a/Resources/Orthanc/Plugins/Samples/Common/FullOrthancDataset.cpp	Thu Dec 15 15:37:40 2016 +0100
+++ b/Resources/Orthanc/Plugins/Samples/Common/FullOrthancDataset.cpp	Fri Dec 16 14:55:19 2016 +0100
@@ -32,7 +32,10 @@
 
 #include "FullOrthancDataset.h"
 
-#include "OrthancPluginCppWrapper.h"
+#include "OrthancPluginException.h"
+
+#include <stdio.h>
+#include <cassert>
 
 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);
     }
   }