1
0

rt_exception.h 673 B

123456789101112131415161718192021222324252627
  1. #ifndef AFUN_RT_EXCEPTION_H
  2. #define AFUN_RT_EXCEPTION_H
  3. #include "aFuntool.h"
  4. namespace aFunrt {
  5. class aFunrtException : public aFuntool::aFunException {
  6. public:
  7. AFUN_INLINE explicit aFunrtException(const std::string &msg);
  8. };
  9. class RuntimeError : public aFunrtException {
  10. std::string type;
  11. public:
  12. AFUN_INLINE RuntimeError(const std::string &msg, std::string type);
  13. AFUN_INLINE const std::string &getType() const;
  14. };
  15. class ArgumentError : public RuntimeError {
  16. std::string type;
  17. public:
  18. AFUN_INLINE ArgumentError();
  19. };
  20. }
  21. #include "rt_exception.inline.h"
  22. #endif //AFUN_RT_EXCEPTION_H