#ifndef WC3RE_EXCEPTIONS_HH__ #define WC3RE_EXCEPTIONS_HH__ #include class Exception { public: Exception(std::string msg = ""); virtual ~Exception(); virtual std::string toString() const; protected: std::string msg_; }; class FormatException : public Exception { public: FormatException(std::string msg); std::string toString() const override; }; class PathException : public Exception { public: PathException(std::string msg); std::string toString() const override; }; class POSIXException : public Exception { public: POSIXException(int err, std::string msg = ""); int getErr() const; std::string toString() const override; private: int err_; }; #endif