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

◆ invalid_argument() [1/2]

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

Throw an invalid_argument exception with a consistently formatted message.

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

Template Parameters
TType of variable
Parameters
functionName of the function
nameName of the variable
yVariable
msg1Message to print before the variable
msg2Message to print after the variable
Exceptions
std::invalid_argument

Definition at line 27 of file invalid_argument.hpp.