core-exception.h 807 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. inline explicit aFuncoreException(const std::string &msg);
  8. };
  9. class EnvironmentDestructException : public aFuncoreException {
  10. public:
  11. inline EnvironmentDestructException();
  12. };
  13. class RuntimeError : public aFuncoreException {
  14. std::string type;
  15. public:
  16. inline RuntimeError(const std::string &msg, std::string type);
  17. inline const std::string &getType() const;
  18. };
  19. class ArgumentError : public RuntimeError {
  20. std::string type;
  21. public:
  22. inline ArgumentError();
  23. };
  24. }
  25. #include "core-exception.inline.h"
  26. #endif //AFUN_CORE_EXCEPTION_H