77 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::OutOfMemoryError>);
78 static_assert(
true == std::is_base_of_v<std::bad_alloc, jau::OutOfMemoryError>);
79 static_assert(
true == std::is_base_of_v<std::exception, jau::OutOfMemoryError>);
85 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::RuntimeExceptionBase>);
86 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::RuntimeException>);
87 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::RuntimeException>);
88 static_assert(
true == std::is_base_of_v<std::exception, jau::RuntimeException>);
94 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::LogicErrorBase>);
95 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::LogicError>);
96 static_assert(
true == std::is_base_of_v<std::logic_error, jau::LogicError>);
97 static_assert(
true == std::is_base_of_v<std::exception, jau::LogicError>);
103 static_assert(
true == std::is_base_of_v<std::out_of_range, jau::IndexOutOfBoundsError>);
104 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IndexOutOfBoundsError>);
105 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IndexOutOfBoundsError>);
112 static_assert(
true == std::is_base_of_v<std::invalid_argument, jau::IllegalArgumentError>);
113 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IllegalArgumentError>);
114 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IllegalArgumentError>);
121 static_assert(
true == std::is_base_of_v<std::domain_error, jau::IllegalStateError>);
122 static_assert(
true == std::is_base_of_v<jau::LogicErrorBase, jau::IllegalStateError>);
123 static_assert(
true == std::is_base_of_v<std::logic_error, jau::IllegalStateError>);
130 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::RuntimeSystemExceptionBase>);
131 static_assert(
true == std::is_base_of_v<jau::ExceptionBase, jau::RuntimeSystemExceptionBase>);
132 static_assert(
true == std::is_base_of_v<jau::RuntimeSystemExceptionBase, jau::RuntimeSystemException>);
133 static_assert(
true == std::is_base_of_v<std::system_error, jau::RuntimeSystemException>);
134 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::RuntimeSystemException>);
135 static_assert(
true == std::is_base_of_v<std::exception, jau::RuntimeSystemException>);
142 static_assert(
true == std::is_base_of_v<std::ios_base::failure, jau::IOError>);
143 static_assert(
true == std::is_base_of_v<jau::RuntimeSystemExceptionBase, jau::IOError>);
144 static_assert(
true == std::is_base_of_v<std::system_error, jau::IOError>);
145 static_assert(
true == std::is_base_of_v<jau::RuntimeExceptionBase, jau::IOError>);
146 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::IOError>);
148 REQUIRE_THROWS_AS(
throwIOError(), std::ios_base::failure );
152 REQUIRE_THROWS_AS(
throwIOError(), std::runtime_error );
195TEST_CASE(
"Exception 10 Math",
"[big_int_t][exceptions][error][math]" ) {
197 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathError>);
198 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathError>);
202 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathInexactError>);
203 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathInexactError>);
204 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathInexactError>);
205 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathInexactError>);
212 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathOverflowError>);
213 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathOverflowError>);
214 static_assert(
true == std::is_base_of_v<std::overflow_error, jau::math::MathOverflowError>);
215 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathOverflowError>);
216 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathOverflowError>);
224 static_assert(
true == std::is_base_of_v<jau::math::MathRuntimeErrorBase, jau::math::MathUnderflowError>);
225 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathUnderflowError>);
226 static_assert(
true == std::is_base_of_v<std::underflow_error, jau::math::MathUnderflowError>);
227 static_assert(
true == std::is_base_of_v<std::runtime_error, jau::math::MathUnderflowError>);
228 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathUnderflowError>);
236 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathDomainError>);
237 static_assert(
true == std::is_base_of_v<std::domain_error, jau::math::MathDomainError>);
238 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathDomainError>);
244 static_assert(
true == std::is_base_of_v<jau::math::MathErrorBase, jau::math::MathDivByZeroError>);
245 static_assert(
true == std::is_base_of_v<jau::math::MathDomainError, jau::math::MathDivByZeroError>);
246 static_assert(
true == std::is_base_of_v<std::domain_error, jau::math::MathDivByZeroError>);
247 static_assert(
true == std::is_base_of_v<std::exception, jau::math::MathDivByZeroError>);