1#ifndef STAN_MATH_PRIM_ERR_THROW_DOMAIN_ERROR_HPP
2#define STAN_MATH_PRIM_ERR_THROW_DOMAIN_ERROR_HPP
27 const T& y,
const char* msg1,
const char* msg2) {
28 std::ostringstream message;
31 message << function <<
": " << name <<
" " << msg1 << (*y_ptr) << msg2;
32 throw std::domain_error(message.str());
50 const T& y,
const char* msg1) {
void throw_domain_error(const char *function, const char *name, const T &y, const char *msg1, const char *msg2)
Throw a domain error with a consistently formatted message.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...