Skip to content

Commit

Permalink
feat(bpp-interface): add empty path validation (#6868)
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored Apr 23, 2024
1 parent 5b1b776 commit 702b183
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ class SceneModuleInterface
virtual BehaviorModuleOutput run()
{
updateData();
return isWaitingApproval() ? planWaitingApproval() : plan();
const auto output = isWaitingApproval() ? planWaitingApproval() : plan();
try {
motion_utils::validateNonEmpty(output.path.points);
} catch (const std::exception & ex) {
throw std::invalid_argument("[" + name_ + "]" + ex.what());
}
return output;
}

/**
Expand Down

0 comments on commit 702b183

Please sign in to comment.