diff --git a/test/test_nonfinite_io.cpp b/test/test_nonfinite_io.cpp index 9c50b4c25..da8d8fed0 100644 --- a/test/test_nonfinite_io.cpp +++ b/test/test_nonfinite_io.cpp @@ -277,7 +277,7 @@ template void trap_test_get_nan_impl() os.imbue(new_locale); os.exceptions(std::ios_base::badbit | std::ios_base::failbit); // Enable throwing exceptions. double nan = std::numeric_limits::quiet_NaN(); - BOOST_MATH_CHECK_THROW((os << nan), std::runtime_error); + BOOST_MATH_CHECK_THROW((os << nan), std::exception); // warning : in "check_trap_nan": exception std::runtime_error is expected } // BOOST_AUTO_TEST_CASE(check_trap_nan) @@ -290,7 +290,7 @@ template void trap_test_get_nan_impl() os.imbue(new_locale); os.exceptions(std::ios_base::badbit | std::ios_base::failbit); // Enable throwing exceptions. double inf = std::numeric_limits::infinity(); - BOOST_MATH_CHECK_THROW((os << inf), std::runtime_error); + BOOST_MATH_CHECK_THROW((os << inf), std::exception); // warning : in "check_trap_inf": exception std::runtime_error is expected. } // BOOST_AUTO_TEST_CASE(check_trap_nan_inf)