Skip to content

Commit

Permalink
removed try/catch/throw that had no point.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Lewis authored and Chris Lewis committed Jun 23, 2014
1 parent ff01a7d commit bc40d6b
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions industrial_trajectory_filters/src/add_smoothing_filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,12 @@ class AddSmoothingFilter : public planning_request_adapter::PlanningRequestAdapt
bool result = planner(planning_scene, req, res);

// do anything after calling the nested planner or adapters here
if (result && res.trajectory_)
if (result && res.trajectory_) // successful plan
{
ROS_DEBUG("Running '%s'", getDescription().c_str()); // inform the user
try{
if (!smoothing_filter_.applyFilter(*res.trajectory_)) // do the work
{
throw 31415;
}
} // end of try
catch(int x){
if (!smoothing_filter_.applyFilter(*res.trajectory_)) {// do the smoothing
ROS_ERROR("Smoothing filter of the solution path failed. Filter Not Initialized ");
}// end of catch
}
}// end of if successful plan
return result;
};
Expand Down

0 comments on commit bc40d6b

Please sign in to comment.