00001 #ifndef EDG_WORKLOAD_COMMON_REQUESTAD_MANIPULATIONEXCEPTIONS_H 00002 #define EDG_WORKLOAD_COMMON_REQUESTAD_MANIPULATIONEXCEPTIONS_H 00003 00004 #include <string> 00005 #include <exception> 00006 00007 namespace edg { namespace workload { namespace common { namespace requestad { 00008 00009 class ManipulationException : public std::exception { 00010 public: 00011 explicit ManipulationException( const std::string ¶meter ); 00012 virtual ~ManipulationException( void ) throw(); 00013 00014 inline std::string parameter( void ) const { return this->me_parameter; } 00015 00016 virtual const char *what( void ) const throw(); 00017 virtual std::string reason( void ) const; 00018 00019 protected: 00020 std::string me_parameter; 00021 00022 private: 00023 mutable std::string me_reason; 00024 }; 00025 00026 class CannotGetAttribute : public ManipulationException { 00027 public: 00028 explicit CannotGetAttribute( const std::string ¶meter ); 00029 virtual ~CannotGetAttribute( void ) throw(); 00030 00031 virtual std::string reason( void ) const; 00032 }; 00033 00034 class CannotSetAttribute : public ManipulationException { 00035 public: 00036 explicit CannotSetAttribute( const std::string ¶meter ); 00037 virtual ~CannotSetAttribute( void ) throw(); 00038 00039 virtual std::string reason( void ) const; 00040 }; 00041 00042 class CannotRemoveAttribute : public ManipulationException { 00043 public: 00044 explicit CannotRemoveAttribute( const std::string ¶meter ); 00045 virtual ~CannotRemoveAttribute( void ) throw(); 00046 00047 virtual std::string reason( void ) const; 00048 }; 00049 00050 }}}}; // Namespaces closure 00051 00052 #endif /* EDG_WORKLOAD_COMMON_REQUESTAD_MANIPULATIONEXCEPTIONS_H */ 00053 00054 // Local Variables: 00055 // mode: c++ 00056 // End: