78 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::OutOfMemoryError>);
79 static_assert(
true == std::is_base_of_v<std::bad_alloc, jau::OutOfMemoryError>);
80 static_assert(
true == std::is_base_of_v<std::exception, jau::OutOfMemoryError>);
86 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::RuntimeExceptionBase>);
87 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::RuntimeException>);
88 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::RuntimeException>);
89 static_assert(
true == std::is_base_of_v<std::exception, jau::RuntimeException>);
95 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::LogicErrorBase>);
96 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::LogicError>);
97 static_assert(
true == std::is_base_of_v<std::logic_error, jau::LogicError>);
98 static_assert(
true == std::is_base_of_v<std::exception, jau::LogicError>);
104 static_assert(
true == std::is_base_of_v<std::out_of_range, jau::IndexOutOfBoundsError>);
105 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IndexOutOfBoundsError>);
106 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IndexOutOfBoundsError>);
113 static_assert(
true == std::is_base_of_v<std::invalid_argument, jau::IllegalArgumentError>);
114 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IllegalArgumentError>);
115 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IllegalArgumentError>);
122 static_assert(
true == std::is_base_of_v<std::domain_error, jau::IllegalStateError>);
123 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IllegalStateError>);
124 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IllegalStateError>);
131 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::RuntimeSystemExceptionBase>);
132 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::RuntimeSystemExceptionBase>);
133 static_assert(
true == std::is_base_of_v<jau::RuntimeSystemExceptionBase, jau::RuntimeSystemException>);
134 static_assert(
true == std::is_base_of_v<std::system_error, jau::RuntimeSystemException>);
135 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::RuntimeSystemException>);
136 static_assert(
true == std::is_base_of_v<std::exception, jau::RuntimeSystemException>);
143 static_assert(
true == std::is_base_of_v<std::ios_base::failure, jau::IOError>);
144 static_assert(
true == std::is_base_of_v<jau::RuntimeSystemExceptionBase, jau::IOError>);
145 static_assert(
true == std::is_base_of_v<std::system_error, jau::IOError>);
146 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::IOError>);
147 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::IOError>);
149 REQUIRE_THROWS_AS(
throwIOError(), std::ios_base::failure );
153 REQUIRE_THROWS_AS(
throwIOError(), std::runtime_error );
196TEST_CASE(
"Exception 10 Math",
"[big_int_t][exceptions][error][math]" ) {
198 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathError>);
199 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathError>);
203 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathInexactError>);
204 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathInexactError>);
205 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathInexactError>);
206 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathInexactError>);
213 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathOverflowError>);
214 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathOverflowError>);
215 static_assert(
true == std::is_base_of_v<std::overflow_error, jau::math::MathOverflowError>);
216 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathOverflowError>);
217 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathOverflowError>);
225 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathUnderflowError>);
226 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathUnderflowError>);
227 static_assert(
true == std::is_base_of_v<std::underflow_error, jau::math::MathUnderflowError>);
228 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathUnderflowError>);
229 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathUnderflowError>);
237 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathDomainError>);
238 static_assert(
true == std::is_base_of_v<std::domain_error, jau::math::MathDomainError>);
239 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathDomainError>);
245 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathDivByZeroError>);
246 static_assert(
true == std::is_base_of_v<jau::math::MathDomainError, jau::math::MathDivByZeroError>);
247 static_assert(
true == std::is_base_of_v<std::domain_error, jau::math::MathDivByZeroError>);
248 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathDivByZeroError>);