/* * Copyright (c) 2002, Stefan Farfeleder * $Id: exception.h,v 1.1.1.1 2002/08/18 17:28:51 aeneas Exp $ */ #ifndef JFK_EXCEPTION_H #define JFK_EXCEPTION_H #include #include #include namespace JFK { class exception { public: exception(const std::string& msg) : msg_(msg) {} const std::string& msg() const { return msg_; } protected: std::string msg_; }; /* This extended exception adds a strerror(errno) message to the one * supplied by the user. */ class exception_e : public exception { public: exception_e(const std::string& msg) : exception(msg + ": " + std::strerror(errno)) {} }; } #endif