Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log exception type when catching the exception #1749

Merged
merged 1 commit into from
Sep 11, 2024

Conversation

saikishor
Copy link
Member

After some tests, it seems like there is no proper description of the exception message and it is clearer through the type of exception.

For instance, the issue we faced is: InvalidParameterValueException (https://github.com/ros2/rclcpp/blob/2f71d6e249f626772da3f8a1bb7c8d141d9d0d52/rclcpp/src/rclcpp/parameter_map.cpp#L147) and the error message is "No parameter value set" and it was not clear to use until we went to the source code and started looking, so to handle such situations, I think it is better also to log the type of the exceptions that are thrown.

Thank you!

Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.74%. Comparing base (8552dcf) to head (2000a29).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1749      +/-   ##
==========================================
+ Coverage   86.71%   86.74%   +0.02%     
==========================================
  Files         116      116              
  Lines       10695    10694       -1     
  Branches      984      984              
==========================================
+ Hits         9274     9276       +2     
+ Misses       1064     1062       -2     
+ Partials      357      356       -1     
Flag Coverage Δ
unittests 86.74% <100.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
controller_manager/src/controller_manager.cpp 77.47% <ø> (+0.24%) ⬆️
hardware_interface/src/resource_manager.cpp 73.87% <100.00%> (ø)

@saikishor
Copy link
Member Author

Once @mamueluth accepts the invitation that Bence sent, this Reviewer Lottery job should succeed! :)

@bmagyar bmagyar merged commit 2ee0001 into ros-controls:master Sep 11, 2024
19 of 20 checks passed
@saikishor saikishor deleted the log/exception/type branch October 15, 2024 16:43
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