From d7d4fbe096eb4a100fb5fecb01e6fba7059c38f1 Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Mon, 21 Sep 2015 11:05:32 +0200 Subject: [PATCH] Catch projection_error exceptions --- src/manipulation-planner.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/manipulation-planner.cc b/src/manipulation-planner.cc index 50612f19..e6c88fa8 100644 --- a/src/manipulation-planner.cc +++ b/src/manipulation-planner.cc @@ -22,7 +22,8 @@ #include <hpp/core/path-validation.hh> #include <hpp/core/connected-component.hh> -#include "hpp/core/path-projector.hh" +#include <hpp/core/path-projector.hh> +#include <hpp/core/projection-error.hh> #include "hpp/manipulation/graph/statistics.hh" #include "hpp/manipulation/device.hh" @@ -191,7 +192,13 @@ namespace hpp { GraphPathValidationPtr_t pathValidation (problem_.pathValidation ()); PathValidationReportPtr_t report; HPP_START_TIMECOUNTER (validatePath); - pathValidation->validate (projPath, false, validPath, report); + try { + pathValidation->validate (projPath, false, validPath, report); + } catch (const core::projection_error& e) { + hppDout (error, e.what ()); + addFailure (PATH_VALIDATION, edge); + return false; + } HPP_STOP_TIMECOUNTER (validatePath); if (validPath->length () == 0) addFailure (PATH_VALIDATION, edge); -- GitLab