00001 /* 00002 Copyright (c) Members of the EGEE Collaboration. 2004. 00003 See http://www.eu-egee.org/partners/ for details on the 00004 copyright holders. 00005 00006 Licensed under the Apache License, Version 2.0 (the "License"); 00007 you may not use this file except in compliance with the License. 00008 You may obtain a copy of the License at 00009 00010 http://www.apache.org/licenses/LICENSE-2.0 00011 00012 Unless required by applicable law or agreed to in writing, software 00013 distributed under the License is distributed on an "AS IS" BASIS, 00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 00015 either express or implied. 00016 See the License for the specific language governing permissions and 00017 limitations under the License. 00018 */ 00019 00020 #ifndef GLITE_WMS_COMMON_REQUESTAD_MANIPULATIONEXCEPTIONS_H 00021 #define GLITE_WMS_COMMON_REQUESTAD_MANIPULATIONEXCEPTIONS_H 00022 00023 #include <string> 00024 #include <exception> 00025 00026 namespace glite { 00027 namespace jdl { 00028 00029 class ManipulationException : public std::exception { 00030 public: 00031 explicit ManipulationException( const std::string ¶meter ); 00032 virtual ~ManipulationException( void ) throw(); 00033 00034 inline std::string parameter( void ) const { return this->me_parameter; } 00035 00036 virtual const char *what( void ) const throw(); 00037 virtual std::string reason( void ) const; 00038 00039 protected: 00040 std::string me_parameter; 00041 00042 private: 00043 mutable std::string me_reason; 00044 }; 00045 00046 class CannotGetAttribute : public ManipulationException { 00047 public: 00048 explicit CannotGetAttribute( const std::string ¶meter ); 00049 virtual ~CannotGetAttribute( void ) throw(); 00050 00051 virtual std::string reason( void ) const; 00052 }; 00053 00054 class CannotSetAttribute : public ManipulationException { 00055 public: 00056 explicit CannotSetAttribute( const std::string ¶meter ); 00057 virtual ~CannotSetAttribute( void ) throw(); 00058 00059 virtual std::string reason( void ) const; 00060 }; 00061 00062 class CannotRemoveAttribute : public ManipulationException { 00063 public: 00064 explicit CannotRemoveAttribute( const std::string ¶meter ); 00065 virtual ~CannotRemoveAttribute( void ) throw(); 00066 00067 virtual std::string reason( void ) const; 00068 }; 00069 00070 } // jdl namespace 00071 } // glite namespace 00072 00073 #endif /* GLITE_WMS_COMMON_REQUESTAD_MANIPULATIONEXCEPTIONS_H */ 00074 00075 // Local Variables: 00076 // mode: c++ 00077 // End: