Skip to content

Update exception documentation for goal cancellation in ServerGoalHandle (backport #3019)#3022

Merged
ahcorde merged 1 commit intokiltedfrom
mergify/bp/kilted/pr-3019
Jan 21, 2026
Merged

Update exception documentation for goal cancellation in ServerGoalHandle (backport #3019)#3022
ahcorde merged 1 commit intokiltedfrom
mergify/bp/kilted/pr-3019

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Jan 20, 2026

The documentation for the canceled function is misleading. Previously, the description said:

  1. "Only call this if the goal is canceling." and
  2. "\throws rclcpp::exceptions::RCLError If the goal is in any state besides executing."

This is a contradiction according to the state diagram in the Goal States section of this document: https://design.ros2.org/articles/actions.html
Experimentally verified that if the goal is executing and this method is called, an error is thrown. This makes the second statement wrong => correct the statement in the documentation.

Description

Fixes # (issue)

Is this user-facing behavior change?

Did you use Generative AI?

No

Additional Information

Should I open PRs for the other distributions (humble, jazzy, kilted, etc) where this documentation change has to be made? ☺️


This is an automatic backport of pull request #3019 done by Mergify.

…dle (#3019)

* Update exception documentation for goal cancellation

The documentation for the canceled function is misleading.
Previously, the description said:
1. "Only call this if the goal is canceling." and
2. "\throws rclcpp::exceptions::RCLError If the goal is in any state besides executing."
This is a contradiction.
Experimentally verified that if the goal is executing and this method is called, an error is thrown. This makes the second statement wrong => correct the statement in the documentation.

Signed-off-by: Andrei Costinescu <AndreiCostinescu@users.noreply.github.com>
(cherry picked from commit 6397047)
@ahcorde
Copy link
Copy Markdown
Contributor

ahcorde commented Jan 20, 2026

Pulls: #3022
Gist: https://gist.githubusercontent.com/ahcorde/682074f37dcf312c758a63861af88e50/raw/9e3194d615d5b1b965806e1ea04fab489daa593b/ros2.repos
BUILD args: --packages-up-to rclcpp
TEST args: --packages-select rclcpp
ROS Distro: kilted
Job: ci_launcher
ci_launcher ran: https://ci.ros2.org/job/ci_launcher/17997

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Linux-rhel Build Status
  • Windows Build Status

@ahcorde ahcorde merged commit d5d4f6c into kilted Jan 21, 2026
2 of 3 checks passed
@ahcorde ahcorde deleted the mergify/bp/kilted/pr-3019 branch January 21, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants