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

◆ throw_domain_error_mat() [1/2]

template<typename T , require_eigen_t< T > * = nullptr>
void stan::math::throw_domain_error_mat ( const char *  function,
const char *  name,
const T &  y,
size_t  i,
size_t  j,
const char *  msg1,
const char *  msg2 
)
inline

Throw a domain error with a consistently formatted message for matrices.

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>[<i+error_index, j+error_index>] <msg1><y>" where error_index is the value of stan::error_index::value which indicates whether the message should be 0 or 1 indexed.

Template Parameters
TType of variable
Parameters
functionName of the function
nameName of the variable
yVariable
iRow index
jColumn index
msg1Message to print before the variable
msg2Message to print after the variable
Exceptions
std::domain_errorAlways.

Definition at line 32 of file throw_domain_error_mat.hpp.