Skip to content

Commit

Permalink
Merge pull request #1348 from tier4/add-log-modechange-fail-awf-latest
Browse files Browse the repository at this point in the history
feat(default_ad_api): add log when operation mode change fails
  • Loading branch information
TakaHoribe authored Jun 20, 2024
2 parents d4c5b9e + 4934ce0 commit 5bb7ce7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion system/default_ad_api/src/operation_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,13 @@ void OperationModeNode::change_mode(
const ResponseT res, const OperationModeRequest::_mode_type mode)
{
if (!mode_available_[mode]) {
RCLCPP_WARN(
get_logger(),
"The target mode is not available. Please check the cause with "
"rqt_diagnostics_graph_monitor");
throw component_interface_utils::ServiceException(
ServiceResponse::ERROR_NOT_AVAILABLE, "The mode change is blocked by the system.");
ServiceResponse::ERROR_NOT_AVAILABLE,
"The target mode is not available. Please check the diagnostics.");
}
const auto req = std::make_shared<OperationModeRequest>();
req->mode = mode;
Expand Down

0 comments on commit 5bb7ce7

Please sign in to comment.