1#ifndef STAN_MATH_PRIM_ERR_SYSTEM_ERROR_HPP
2#define STAN_MATH_PRIM_ERR_SYSTEM_ERROR_HPP
25inline void system_error(
const char* function,
const char* name,
const int& y,
26 const char* msg1,
const char* msg2) {
27 std::ostringstream message;
29 message << function <<
": " << name <<
" " << msg1 << msg2;
30 throw std::system_error(y, std::generic_category(), message.str());
45inline void system_error(
const char* function,
const char* name,
const int& y,
void system_error(const char *function, const char *name, const int &y, const char *msg1, const char *msg2)
Throw a system error with a consistently formatted message.
The lgamma implementation in stan-math is based on either the reentrant safe lgamma_r implementation ...