Skip to content

Commit

Permalink
Fix pathfinder return
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Feb 8, 2024
1 parent 2709df7 commit 759a569
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/stan/services/pathfinder/single.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,10 +821,14 @@ inline auto pathfinder_lbfgs_single(
lbfgs_ss.str("");
}
if (ReturnLpSamples) {
// we want to terminate multi-path pathfinder during these unrecoverable
// exceptions
throw;
} else {
logger.error(e.what());
return error_codes::SOFTWARE;
return internal::ret_pathfinder<ReturnLpSamples>(
error_codes::SOFTWARE, Eigen::Array<double, Eigen::Dynamic, 1>(0),
Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>(0, 0), 0);
}
}
}
Expand Down

0 comments on commit 759a569

Please sign in to comment.