Skip to content
Snippets Groups Projects
Commit d7d4fbe0 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Catch projection_error exceptions

parent 0e11d1d0
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
#include <hpp/core/path-validation.hh> #include <hpp/core/path-validation.hh>
#include <hpp/core/connected-component.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/graph/statistics.hh"
#include "hpp/manipulation/device.hh" #include "hpp/manipulation/device.hh"
...@@ -191,7 +192,13 @@ namespace hpp { ...@@ -191,7 +192,13 @@ namespace hpp {
GraphPathValidationPtr_t pathValidation (problem_.pathValidation ()); GraphPathValidationPtr_t pathValidation (problem_.pathValidation ());
PathValidationReportPtr_t report; PathValidationReportPtr_t report;
HPP_START_TIMECOUNTER (validatePath); 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); HPP_STOP_TIMECOUNTER (validatePath);
if (validPath->length () == 0) if (validPath->length () == 0)
addFailure (PATH_VALIDATION, edge); addFailure (PATH_VALIDATION, edge);
......
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