| 81 | }; |
| 82 | |
| 83 | class file_io_error : public std::exception { |
| 84 | public: |
| 85 | file_io_error(const std::string& file) throw() : // #nocov start |
| 86 | message(std::string("file io error: '") + file + "'"), file(file) {}; |
| 87 | file_io_error(int code, const std::string& file) throw() : |
| 88 | message("file io error " + toString(code) + ": '" + file + "'"), file(file) {}; |
| 89 | file_io_error(const std::string& msg, const std::string& file) throw() : |
| 90 | message(msg + ": '" + file + "'"), file(file) {}; |
| 91 | virtual ~file_io_error() throw() {}; |
| 92 | virtual const char* what() const throw() { return message.c_str(); }; |
| 93 | std::string filePath() const throw() { return file; }; // #nocov end |
| 94 | private: |
| 95 | std::string message; |
| 96 | std::string file; |
| 97 | } ; |
| 98 | |
| 99 | class file_not_found : public file_io_error { // #nocov start |
| 100 | public: |
no outgoing calls
no test coverage detected