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>[<i+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
-
- Parameters
-
function | Name of the function |
name | Name of the variable |
y | Variable |
i | Index |
msg1 | Message to print before the variable |
msg2 | Message to print after the variable |
- Exceptions
-
Definition at line 31 of file throw_domain_error_vec.hpp.