Stan  1.0
probability, sampling & optimization
Functions
stan::math::policies::detail Namespace Reference

Reimplementing boost::math::policies::detail::raise_domain_error. More...

Functions

template<class T_result , class T_val >
T_result raise_domain_error (const char *function, const char *message, const T_val &val, const ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error > &)
 
template<class T_result , class T_val >
T_result raise_domain_error (const char *, const char *, const T_val &, const ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error > &)
 
template<class T_result , class T_val >
T_result raise_domain_error (const char *, const char *, const T_val &, const ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error > &)
 
template<class T_result , class T_val >
T_result raise_domain_error (const char *function, const char *message, const T_val &val, const ::boost::math::policies::domain_error< ::boost::math::policies::user_error > &)
 

Detailed Description

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.

Function Documentation

◆ raise_domain_error() [1/4]

template<class T_result , class T_val >
T_result stan::math::policies::detail::raise_domain_error ( const char *  ,
const char *  ,
const T_val &  ,
const ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error > &   
)
inline

Definition at line 34 of file boost_error_handling.hpp.

◆ raise_domain_error() [2/4]

template<class T_result , class T_val >
T_result stan::math::policies::detail::raise_domain_error ( const char *  ,
const char *  ,
const T_val &  ,
const ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error > &   
)
inline

Definition at line 24 of file boost_error_handling.hpp.

◆ raise_domain_error() [3/4]

template<class T_result , class T_val >
T_result stan::math::policies::detail::raise_domain_error ( const char *  function,
const char *  message,
const T_val &  val,
const ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error > &   
)
inline

Definition at line 14 of file boost_error_handling.hpp.

◆ raise_domain_error() [4/4]

template<class T_result , class T_val >
T_result stan::math::policies::detail::raise_domain_error ( const char *  function,
const char *  message,
const T_val &  val,
const ::boost::math::policies::domain_error< ::boost::math::policies::user_error > &   
)
inline

Definition at line 45 of file boost_error_handling.hpp.


     [ Stan Home Page ] © 2011–2012, Stan Development Team.