Skip to content

Commit 297c302

Browse files
committed
lapack throws a std::exception not a runtime_error
This catch was being ignored when cholesky_solve fails
1 parent 3e169c5 commit 297c302

File tree

1 file changed

+1
-1
lines changed
  • src/TiledArray/math/solvers/cp

1 file changed

+1
-1
lines changed

src/TiledArray/math/solvers/cp/cp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ class CP {
314314
// MtKRP);
315315
try {
316316
MtKRP = math::linalg::cholesky_solve(W, MtKRP);
317-
} catch (std::runtime_error& ex) {
317+
} catch (std::exception& ex){
318318
// if W is near-singular try LU instead of Cholesky
319319
if (std::string(ex.what()).find("lapack::posv failed") !=
320320
std::string::npos) {

0 commit comments

Comments
 (0)