#ifndef EXCEPTION_H #define EXCEPTION_H namespace icinga { class Exception { private: string m_Message; public: typedef shared_ptr Ptr; typedef weak_ptr WeakPtr; Exception(void); Exception(const string& message); virtual ~Exception(void); string GetMessage(void) const; }; } #define DEFINE_EXCEPTION_CLASS(klass) \ class klass : public Exception \ { \ public: \ typedef shared_ptr Ptr; \ typedef weak_ptr WeakPtr; \ \ inline klass(void) : Exception() \ { \ } \ \ inline klass(const string& message) : Exception(message) \ { \ } \ }; #endif /* EXCEPTION_H */