Skip to content

Commit 09542d0

Browse files
authored
Merge pull request #3214 from stan-dev/eigen-custom-assert-better
Include assertion that failed in STAN_OVERRIDE_EIGEN_ASSERT
2 parents bdd5b3e + 5227415 commit 09542d0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

stan/math/prim/fun/Eigen.hpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
#ifdef eigen_assert
66
#undef eigen_assert
77
#endif
8-
#define eigen_assert(x) \
9-
if (!(x)) { \
10-
throw(std::domain_error("Internal Eigen Error")); \
8+
#define eigen_assert(x) \
9+
if (!(x)) { \
10+
throw(std::domain_error("Internal Eigen Error: Assertion '" #x \
11+
"' failed in " __FILE__)); \
1112
}
1213
#endif
1314
#ifdef EIGEN_MATRIXBASE_PLUGIN

0 commit comments

Comments
 (0)