Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ throw_domain_error() [2/2]

template<typename T >
void stan::math::throw_domain_error ( const char *  function,
const char *  name,
const T &  y,
const char *  msg1 
)
inline

Throw a domain error with a consistently formatted message.

This is an abstraction for all Stan functions to use when throwing domain errors. This will allow us to change the behavior for all functions at once. The message is: * "<function>: <name> <msg1><y>"

Template Parameters
TType of variable.
Parameters
[in]functionName of the function.
[in]nameName of the variable.
[in]yVariable.
[in]msg1Message to print before the variable.
Exceptions
std::domain_errorAlways.

Definition at line 49 of file throw_domain_error.hpp.