tool-exception.inline.h 793 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef AFUN_TOOL_EXCEPTION_INLINE_H
  2. #define AFUN_TOOL_EXCEPTION_INLINE_H
  3. #include "tool-exception.h"
  4. namespace aFuntool {
  5. inline FileOpenException::FileOpenException(const FilePath &file) {
  6. this->message = std::string("File cannot open: ") + file;
  7. }
  8. inline const char *FileOpenException::what() {
  9. return message.c_str();
  10. }
  11. inline RegexException::RegexException(const std::string &msg) {
  12. this->message = "Regex error: " + msg;
  13. }
  14. inline const char *RegexException::what() {
  15. return message.c_str();
  16. }
  17. inline LogFatalError::LogFatalError(const char *msg) {
  18. this->message = msg;
  19. }
  20. inline const char *LogFatalError::what() {
  21. return message.c_str();
  22. }
  23. }
  24. #endif //AFUN_TOOL_EXCEPTION_INLINE_H