diff --git a/stan/math/prim/fun/Eigen.hpp b/stan/math/prim/fun/Eigen.hpp index c012d225d1b..9678be671ad 100644 --- a/stan/math/prim/fun/Eigen.hpp +++ b/stan/math/prim/fun/Eigen.hpp @@ -5,9 +5,10 @@ #ifdef eigen_assert #undef eigen_assert #endif -#define eigen_assert(x) \ - if (!(x)) { \ - throw(std::domain_error("Internal Eigen Error")); \ +#define eigen_assert(x) \ + if (!(x)) { \ + throw(std::domain_error("Internal Eigen Error: Assertion '" #x \ + "' failed in " __FILE__)); \ } #endif #ifdef EIGEN_MATRIXBASE_PLUGIN