#ifndef RUNTIME_EXCEPTION_H #define RUNTIME_EXCEPTION_H #include #include using std::string; /** * Generic Exception class */ class RuntimeException { private: string errorMsg; public: RuntimeException(const string& err) { errorMsg = err; } string getMessage() const { return errorMsg; } }; inline std::ostream& operator<<(std::ostream& out, const RuntimeException& e) { return out << e.getMessage(); } #endif