![]() |
Stan
2.5.0
probability, sampling & optimization
|
Reimplementing boost::math::policies::detail::raise_domain_error. More...
Reimplementing boost::math::policies::detail::raise_domain_error.
For error handling, Stan requires raise_domain_error to handle two template parameters, one for the return type and the other for the input type.
In boost, these functions are in namespace boost::math::policies:details. Since reimplementing these functions in that namespace could lead to ambiguous functions calls, they are placed in stan::math::policies::details.
These functions still rely on boost::math::policies::detail::raise_error.
TODO: user_error may need to be refactored to include the two template parameters.