Skip to content

Commit

Permalink
Fix pathfinder return
Browse files Browse the repository at this point in the history
  • Loading branch information
WardBrian committed Jan 25, 2024
1 parent f86099d commit de17945
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 @@ -822,10 +822,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 de17945

Please sign in to comment.