core-exception.h 832 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef AFUN_CORE_EXCEPTION_H
  2. #define AFUN_CORE_EXCEPTION_H
  3. #include "aFuntool.h"
  4. namespace aFuncore {
  5. class aFuncoreException : public aFuntool::aFunException {
  6. public:
  7. AFUN_INLINE explicit aFuncoreException(const std::string &msg);
  8. };
  9. class EnvironmentDestructException : public aFuncoreException {
  10. public:
  11. AFUN_INLINE EnvironmentDestructException();
  12. };
  13. class RuntimeError : public aFuncoreException {
  14. std::string type;
  15. public:
  16. AFUN_INLINE RuntimeError(const std::string &msg, std::string type);
  17. AFUN_INLINE const std::string &getType() const;
  18. };
  19. class ArgumentError : public RuntimeError {
  20. std::string type;
  21. public:
  22. AFUN_INLINE ArgumentError();
  23. };
  24. }
  25. #include "core-exception.inline.h"
  26. #endif //AFUN_CORE_EXCEPTION_H