Added exception handling code but has not yet been exercised! Chris will do so...

release/4.3a0
Frank Dellaert 2011-09-05 21:27:41 +00:00
parent e56b6ff392
commit 0e3b96db60
1 changed files with 9 additions and 1 deletions

View File

@ -323,7 +323,15 @@ namespace gtsam {
// some untouched non-zeros that should be zero. We zero them while
// extracting submatrices next.
tic(4, "partial Cholesky");
combinedFactor->partialCholesky(nrFrontals);
try {
combinedFactor->partialCholesky(nrFrontals);
} catch
(std::exception &ex) { // catch exception from Cholesky
combinedFactor->print("combinedFactor");
string reason = "EliminateCholesky failed while trying to eliminate the combined factor";
throw invalid_argument(reason);
}
toc(4, "partial Cholesky");
// Extract conditionals and fill in details of the remaining factor