rt_exception.inline.h 558 B

1234567891011121314151617181920212223
  1. #ifndef AFUN_RT_EXCEPTION_INLINE_H
  2. #define AFUN_RT_EXCEPTION_INLINE_H
  3. #include "rt_exception.h"
  4. namespace aFunrt {
  5. aFunrtException::aFunrtException(const std::string &msg) : aFunException{msg} {
  6. }
  7. RuntimeError::RuntimeError(const std::string &msg, std::string type_) : aFunrtException(msg), type{std::move(type_)} {
  8. }
  9. const std::string &RuntimeError::getType() const {
  10. return type;
  11. }
  12. ArgumentError::ArgumentError() : RuntimeError("Argument mismatch", "ArgumentError") {
  13. }
  14. }
  15. #endif //AFUN_RT_EXCEPTION_INLINE_H