diff OrthancCppClient/Instance.cpp @ 504:50d9660f960c laaw

laaw exception
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 18 Jul 2013 10:12:20 +0200
parents ec19da4a1fe7
children eaca3d38b2aa
line wrap: on
line diff
--- a/OrthancCppClient/Instance.cpp	Thu Jul 18 09:32:03 2013 +0200
+++ b/OrthancCppClient/Instance.cpp	Thu Jul 18 10:12:20 2013 +0200
@@ -33,7 +33,6 @@
 #include "Instance.h"
 
 #include "OrthancConnection.h"
-#include "../Core/OrthancException.h"
 
 #include <boost/lexical_cast.hpp>
 
@@ -63,7 +62,7 @@
           break;
           
         default:
-          throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
+          throw OrthancClientException(Orthanc::ErrorCode_NotImplemented);
       }
 
       Orthanc::HttpClient client(connection_.GetHttpClient());
@@ -72,7 +71,7 @@
 
       if (!client.Apply(png))
       {
-        throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
+        throw OrthancClientException(Orthanc::ErrorCode_NotImplemented);
       }
      
       reader_.reset(new Orthanc::PngReader);
@@ -92,7 +91,7 @@
     Json::Value v;
     if (!client.Apply(tags_))
     {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_NetworkProtocol);
+      throw OrthancClientException(Orthanc::ErrorCode_NetworkProtocol);
     }
   }
 
@@ -104,7 +103,7 @@
     }
     else
     {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_InexistentItem);
+      throw OrthancClientException(Orthanc::ErrorCode_InexistentItem);
     }
   }
 
@@ -118,7 +117,7 @@
     }
     catch (boost::bad_lexical_cast)
     {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
+      throw OrthancClientException(Orthanc::ErrorCode_BadFileFormat);
     }
   }
 
@@ -132,7 +131,7 @@
     }
     catch (boost::bad_lexical_cast)
     {
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
+      throw OrthancClientException(Orthanc::ErrorCode_BadFileFormat);
     }
   }
 
@@ -218,7 +217,7 @@
     catch (boost::bad_lexical_cast)
     {
       // Unable to parse the Image Orientation Patient.
-      throw Orthanc::OrthancException(Orthanc::ErrorCode_BadFileFormat);
+      throw OrthancClientException(Orthanc::ErrorCode_BadFileFormat);
     }
   }
 }