#pragma once

#include "../exception_base.hpp"

namespace dv::exceptions {

namespace info {
struct RuntimeError : EmptyException {};
} // namespace info

using RuntimeError = internal::Exception_<info::RuntimeError>;

namespace info {
struct BadAlloc : EmptyException {};
} // namespace info

using BadAlloc = internal::Exception_<info::BadAlloc>;

namespace info {
struct OutOfRange : EmptyException {};
} // namespace info

using OutOfRange = internal::Exception_<info::OutOfRange>;

namespace info {
struct LengthError : EmptyException {};
} // namespace info

using LengthError = internal::Exception_<info::LengthError>;

namespace info {
template<class TYPE>
struct InvalidArgument {
	using Info = TYPE;

	static std::string format(const Info &info) {
		return fmt::format("Value: {}", info);
	}
};
} // namespace info
template<class TYPE>
using InvalidArgument = internal::Exception_<info::InvalidArgument<TYPE>>;

namespace info {
struct NullPointer : EmptyException {};
} // namespace info

using NullPointer = internal::Exception_<info::NullPointer>;

} // namespace dv::exceptions
