From 2a66b538a478aebd97b0038d9ed13a012093a576 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Fri, 17 Aug 2012 03:45:28 +0000 Subject: [PATCH] More detailed disconnected graph error message --- gtsam/inference/EliminationTree.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gtsam/inference/EliminationTree.h b/gtsam/inference/EliminationTree.h index 286f85268..f2b0c1eaf 100644 --- a/gtsam/inference/EliminationTree.h +++ b/gtsam/inference/EliminationTree.h @@ -167,7 +167,12 @@ struct DisconnectedGraphException : public std::exception { /// Returns the string "Attempting to eliminate a disconnected graph - this is not currently possible in gtsam." virtual const char* what() const throw() { - return "Attempting to eliminate a disconnected graph - this is not currently possible in gtsam."; } + return + "Attempting to eliminate a disconnected graph - this is not currently possible in\n" + "GTSAM. You may add \"empty\" BetweenFactor's to join disconnected graphs, these\n" + "will affect the symbolic structure and solving complexity of the graph but not\n" + "the solution. To do this, create BetweenFactor's with zero-precision noise\n" + "models, i.e. noiseModel::Isotropic::Precision(n, 0.0);\n"; } }; }