Skip to content
Snippets Groups Projects
Commit ca2950bd authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Make error message more explicit.

parent a9b4ed11
No related branches found
No related tags found
No related merge requests found
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
// received a copy of the GNU Lesser General Public License along with // received a copy of the GNU Lesser General Public License along with
// hpp-manipulation. If not, see <http://www.gnu.org/licenses/>. // hpp-manipulation. If not, see <http://www.gnu.org/licenses/>.
#include <hpp/model/configuration.hh>
#include "hpp/manipulation/graph/node-selector.hh" #include "hpp/manipulation/graph/node-selector.hh"
#include <cstdlib> #include <cstdlib>
...@@ -47,10 +48,13 @@ namespace hpp { ...@@ -47,10 +48,13 @@ namespace hpp {
NodePtr_t NodeSelector::getNode(ConfigurationIn_t config) const NodePtr_t NodeSelector::getNode(ConfigurationIn_t config) const
{ {
for (Nodes_t::const_iterator it = orderedStates_.begin(); for (Nodes_t::const_iterator it = orderedStates_.begin();
orderedStates_.end() != it; ++it) orderedStates_.end() != it; ++it) {
if ((*it)->contains(config)) if ((*it)->contains(config))
return *it; return *it;
throw std::logic_error ("A configuration has no node"); }
std::stringstream oss;
oss << "A configuration has no node:" << model::displayConfig (config);
throw std::logic_error (oss.str ());
} }
EdgePtr_t NodeSelector::chooseEdge(const NodePtr_t& node) const EdgePtr_t NodeSelector::chooseEdge(const NodePtr_t& node) const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment