diff --git a/include/boost/math/tools/error_handling.hpp b/include/boost/math/tools/error_handling.hpp index 316e3c283..6b1f74ecc 100644 --- a/include/boost/math/tools/error_handling.hpp +++ b/include/boost/math/tools/error_handling.hpp @@ -68,23 +68,23 @@ namespace detail // // An argument is outside it's allowed range: -// -template -inline T domain_error(const char* function, const char* message) -{ - errno = EDOM; -#ifndef BOOST_MATH_THROW_ON_DOMAIN_ERROR - if(std::numeric_limits::has_quiet_NaN) - return std::numeric_limits::quiet_NaN(); - // - // If T doesn't have a quiet NaN, - // we want to fall through and throw an exception: - // -#endif - detail::raise_error(function, message ? message : "Domain Error"); - // We don't get here: - return 0; -} +// 2 argument version to be retired in favour of 3 argument version. +//template +//inline T domain_error(const char* function, const char* message) +//{ +// errno = EDOM; +//#ifndef BOOST_MATH_THROW_ON_DOMAIN_ERROR +// if(std::numeric_limits::has_quiet_NaN) +// return std::numeric_limits::quiet_NaN(); +// // +// // If T doesn't have a quiet NaN, +// // we want to fall through and throw an exception: +// // +//#endif +// detail::raise_error(function, message ? message : "Domain Error"); +// // We don't get here: +// return 0; +//} template inline T domain_error(const char* function, const char* message, const T& val) @@ -105,11 +105,12 @@ inline T domain_error(const char* function, const char* message, const T& val) // // Evaluation at a pole, this is currently treated the same as a domain error: // -template -inline T pole_error(const char* function, const char* message) -{ - return domain_error(function, message ? message : "Evaluation at pole"); -} +// 2 argument version to be retired in favour of 3 argument version. +//template +//inline T pole_error(const char* function, const char* message) +//{ +// return domain_error(function, message ? message : "Evaluation at pole"); +//} template inline T pole_error(const char* function, const char* message, const T& val) @@ -168,14 +169,16 @@ inline T denorm_error(T const& t, const char* , const char* ) // Error suppresse // // Computed result is garbage / internal error: // -template -inline T logic_error(const char* function, const char* message) -{ - errno = EDOM; - detail::raise_error(function, message ? message : "Internal logic error"); - // We don't get here: - return 0; -} +// 2 argument version to be retired in favour of 3 argument version. + +//template +//inline T logic_error(const char* function, const char* message) +//{ +// errno = EDOM; +// detail::raise_error(function, message ? message : "Internal logic error"); +// // We don't get here: +// return 0; +//} template inline T logic_error(const char* function, const char* message, const T& val)