tool-exception.h 792 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef AFUN_TOOL_EXCEPTION_H
  2. #define AFUN_TOOL_EXCEPTION_H
  3. #include "tool.h"
  4. namespace aFuntool {
  5. class FileOpenException : public std::exception {
  6. std::string message;
  7. public:
  8. inline explicit FileOpenException(const FilePath &file);
  9. inline virtual const char *what();
  10. };
  11. class RegexException : public std::exception
  12. {
  13. std::string message;
  14. public:
  15. inline explicit RegexException(const std::string &msg);
  16. inline virtual const char *what();
  17. };
  18. class LogFatalError : public std::exception {
  19. std::string message;
  20. public:
  21. inline explicit LogFatalError(const char *msg);
  22. inline virtual const char *what();
  23. };
  24. }
  25. #include "tool-exception.inline.h"
  26. #endif //AFUN_TOOL_EXCEPTION_H