Skip to content

Commit b2af1cd

Browse files
committed
Merge commit '11663a2e79e6dc4286ebf1399573a7048667b1c5' into HEAD
2 parents 5c5dfc6 + 11663a2 commit b2af1cd

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

stan/math/prim/err/check_matching_dims.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,11 @@ inline void check_matching_dims(const char* function, const char* name1,
8585
[&]() STAN_COLD_PATH {
8686
std::ostringstream y1_err;
8787
std::ostringstream msg_str;
88-
y1_err << "(" << y1.rows() << ", " << y1.cols() << ")";
89-
msg_str << y2.rows() << ", " << y2.cols() << ") must match in size";
90-
invalid_argument(function, name1, y1_err.str(), "(",
88+
y1_err << "(" << y1.rows() << ", " << y1.cols() << ") and ";
89+
msg_str << " (" << y2.rows() << ", " << y2.cols()
90+
<< ") must match in size";
91+
invalid_argument(function, name1, name2,
92+
std::string(y1_err.str()).c_str(),
9193
std::string(msg_str.str()).c_str());
9294
}();
9395
}

0 commit comments

Comments
 (0)