ros-infrastructure / catkin_pkg

Standalone Python library for the catkin build system.
https://github.com/ros/catkin
Other
47 stars 91 forks source link

improve exception message #159

Closed dirk-thomas closed 7 years ago

dirk-thomas commented 7 years ago

Improve exception message to mention the section name which was searched for.

Fixes #158.

@ros-infrastructure/ros_team Please review.

130s commented 7 years ago

Thanks for the quick action!

So, what's "section"? is the first question I had when I saw the error message, which I couldn't figure out until I took a look at the inline comment. Can we print something like "version section"?

dirk-thomas commented 7 years ago

For reStructuredText the term section is clearly defined. Imo the current message already provides enough information to identify the problem since it includes the version number. If you feel strongly about this please feel free to create a PR and we can see what others think.

130s commented 7 years ago

I agree for the case where the cause was the missing version section, this PR gives much better output (see https://github.com/ros-infrastructure/catkin_pkg/issues/158#issuecomment-277852080).

I don't know about the case where the following error occurs. I'm afraid users will have no idea what "section" is.

ERROR: Could neither find section "None" nor any other section

dirk-thomas commented 7 years ago

ERROR: Could neither find section "None" nor any other section

This error message can't happen anymore with the patch applied.