Improve error reporting by adding file locations to exceptions#823
Improve error reporting by adding file locations to exceptions#823christophebedard merged 7 commits intoros2:rollingfrom
Conversation
Signed-off-by: Roland Arsenault <roland@ccom.unh.edu>
Signed-off-by: Roland Arsenault <roland@ccom.unh.edu>
christophebedard
left a comment
There was a problem hiding this comment.
Thanks for the PR. Could you add simple before/after example outputs in the PR description (including the commands you ran to get the output, if possible) to show how this improves error reporting?
|
Example output using https://github.com/rolker/launch_error_examples This is a simpler set of launch files than what I was dealing with when I created the patch, but still has some nested includes to better showcase the issue when dealing with complex launch files. It should be noted that this helps with error that pop up when the launch description is executed. Errors while loading/evaluating the files tend to display the file location of the error. Before the patch: With this patch applied. Notice the added info where the exception is printed with the added notes. |
Signed-off-by: Roland Arsenault <roland@ccom.unh.edu>
Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com> Signed-off-by: Roland Arsenault <roland@rolker.net>
Signed-off-by: Roland Arsenault <roland@ccom.unh.edu>
|
Pulls: #823 |
… add_note Signed-off-by: Roland Arsenault <roland@ccom.unh.edu>
fujitatomoya
left a comment
There was a problem hiding this comment.
lgtm, (this does not block the PR) how about adding the test around https://github.com/ros2/launch/blob/rolling/launch/test/launch/actions/test_include_launch_description.py?
If @rolker wants to, but I don't think we need anything fancy here. |
Co-authored-by: Christophe Bedard <bedard.christophe@gmail.com> Signed-off-by: Roland Arsenault <roland@rolker.net>
I need to focus on my main tasks at the moment so I'll pass for now. I'd like to revisit some of this at some later time when I have a few more spare cycles. |
|
Thanks again for the PR and for persisting! |
|
Your welcome and thanks for guiding me through! |
In order to pinpoint which launch file caused an exception, this patch intercepts exceptions and adds notes that help determine the source of the error.
This might help with #799 as well.