More detailed disconnected graph error message

release/4.3a0
Richard Roberts 2012-08-17 03:45:28 +00:00
parent 88f504b73d
commit 2a66b538a4
1 changed files with 6 additions and 1 deletions

View File

@ -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"; }
};
}