Skip to content

Commit

Permalink
Address PR recommendation to add try-catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
chambbj committed Feb 13, 2020
1 parent 62e5494 commit d2943c1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion filters/CSFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,14 @@ PointViewSet CSFilter::run(PointViewPtr view)
std::vector<int> groundIdx, offGroundIdx;
c.setLog(log());
c.setPointCloud(csfPC);
c.do_filtering(groundIdx, offGroundIdx, true);
try
{
c.do_filtering(groundIdx, offGroundIdx, true);
}
catch (std::exception& e)
{
throwError(e.what());
}

for (auto const& i : groundIdx)
firstView->setField(Dimension::Id::Classification, i, 2);
Expand Down

0 comments on commit d2943c1

Please sign in to comment.