exception.h 668 B

1234567891011121314151617181920212223
  1. #ifndef EAX_EXCEPTION_INCLUDED
  2. #define EAX_EXCEPTION_INCLUDED
  3. #include <stdexcept>
  4. #include <string>
  5. #include <string_view>
  6. class EaxException : public std::runtime_error {
  7. static std::string make_message(std::string_view context, std::string_view message);
  8. public:
  9. EaxException() = delete;
  10. EaxException(const EaxException&) = default;
  11. EaxException(EaxException&&) = default;
  12. EaxException(std::string_view context, std::string_view message);
  13. ~EaxException() override;
  14. auto operator=(const EaxException&) -> EaxException& = default;
  15. auto operator=(EaxException&&) -> EaxException& = default;
  16. };
  17. #endif /* EAX_EXCEPTION_INCLUDED */