// PtrException.h #ifndef PtrException_H #define PtrException_H // These are the exceptions thrown in package ptr. #include // Base class -- all ptr exceptions derive from this. class PtrException { public: PtrException(std::string message= ""); virtual ~PtrException(); }; // Thrown when an unexpected policy is found. class PtrInvalidPointer : public PtrException { public: PtrInvalidPointer(); }; // Thrown when a pointer tries to take management but is refused. class PtrCannotGetManagement : public PtrException { public: PtrCannotGetManagement(); }; // Thrown when a pointer does not have management. class PtrDoesNotHaveManagement : public PtrException { public: PtrDoesNotHaveManagement(); }; // Thrown when a cast fails. class PtrInvalidCast : public PtrException { public: PtrInvalidCast(); }; #endif