diff Plugins/Engine/OrthancPlugins.cpp @ 1646:da799f767e5d

simplification in error casting with plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 24 Sep 2015 16:01:09 +0200
parents 939b921b2c81
children 8040d56cb0b3
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp	Thu Sep 24 15:55:17 2015 +0200
+++ b/Plugins/Engine/OrthancPlugins.cpp	Thu Sep 24 16:01:09 2015 +0200
@@ -91,7 +91,7 @@
 
         if (error != OrthancPluginErrorCode_Success)
         {
-          throw OrthancException(Plugins::Convert(error));
+          throw OrthancException(static_cast<ErrorCode>(error));
         }
       }
 
@@ -108,7 +108,7 @@
 
         if (error != OrthancPluginErrorCode_Success)
         {
-          throw OrthancException(Plugins::Convert(error));
+          throw OrthancException(static_cast<ErrorCode>(error));
         }
 
         try
@@ -138,7 +138,7 @@
 
         if (error != OrthancPluginErrorCode_Success)
         {
-          throw OrthancException(Plugins::Convert(error));
+          throw OrthancException(static_cast<ErrorCode>(error));
         }
       }
     };
@@ -464,7 +464,7 @@
     }
     else
     {
-      throw OrthancException(Plugins::Convert(error));
+      throw OrthancException(static_cast<ErrorCode>(error));
     }
   }
 
@@ -485,7 +485,7 @@
 
       if (error != OrthancPluginErrorCode_Success)
       {
-        throw OrthancException(Plugins::Convert(error));
+        throw OrthancException(static_cast<ErrorCode>(error));
       }
     }
   }
@@ -507,7 +507,7 @@
 
       if (error != OrthancPluginErrorCode_Success)
       {
-        throw OrthancException(Plugins::Convert(error));
+        throw OrthancException(static_cast<ErrorCode>(error));
       }
     }
   }