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

Fixed error messages not printing to terminal #777

Merged
merged 5 commits into from Jul 11, 2019

Conversation

yathartha3
Copy link
Contributor

Currently, some ROS2 node exception handling error messages are not being printed to the terminal because the print command was commented out. I have removed the comments and it is working in my system (Ubuntu 18.04, with ROS2).
This will help the debugging process since now, the error messages will be visible.

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>
Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>
Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>
@rotu
Copy link
Contributor

rotu commented Jul 7, 2019

Fixes #776

@rotu
Copy link
Contributor

rotu commented Jul 7, 2019

What’s the deal with that todo comment by @Karsten1987 ? Why was this code commented out in the first place?

@jacobperron
Copy link
Member

Let's see if Windows likes it: Build Status

@jacobperron
Copy link
Member

jacobperron commented Jul 9, 2019

Strange. CI for Windows interprets the error message (which is correctly produced in the test output) as a build warning. This likely what the TODO is about.

@rotu
Copy link
Contributor

rotu commented Jul 9, 2019

That must be what the todo comment meant. :-/

Copy link
Contributor Author

@yathartha3 yathartha3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the "\n" characters from the log message

Update lifecycle_node_interface_impl.hpp

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>
@jacobperron
Copy link
Member

Removed the "\n" characters from the log message

Thanks, unfortunately it looks like the build warning persists.

@rotu
Copy link
Contributor

rotu commented Jul 10, 2019

Just change "Original error msg:" to "Original error" and you should be good.

Also, we should file an upstream bug against ros2/ci. The Jenkins warnings plugin responsible for this CI failure is deprecated. Edit: ✅issues filed

I was able to reproduce the problem with this regex tester:
https://www.regexplanet.com/advanced/java/index.html

Put this in the "regular expression" field:

(?:^(?:.*)Command line warning ([A-Za-z0-9]+):\s*(.*)\s*\[(.*)\])|^(?:.*\[.*\])?\s*(?:(?:\s*\d+>)?(?:(?:(?:(.*)\((\d*)(?:,(\d+))?.*\)|.*LINK)\s*:|(.*):)\s*([A-z-_]*\s?(?:[Nn]ote|[Ii]nfo|[Ww]arning|(?:fatal\s*)?[Ee]rror))\s*:?\s*([A-Za-z0-9]+)\s*:\s(?:\s*([A-Za-z0-9.]+)\s*:)?\s*(.*?)(?: \[([^\]]*)[/\\][^\]\\]+\])?|(.*)\s*:.*error\s*(LNK[0-9]+):\s*(.*)))$

Check the "^ and $ match EOL (MULTILINE)" field.
And put this in input 1:

4: [==========] Running 4 tests from 1 test case.
4: [----------] Global test environment set-up.
4: [----------] 4 tests from TestCallbackExceptions
4: [ RUN      ] TestCallbackExceptions.positive_on_error
4: [ERROR] []: Caught exception in callback for transition 10
4: 
4: [ERROR] []: Original error msg: custom exception raised in configure callback
4: 
4: [WARN] []: Error occurred while doing error handling.
4: [       OK ] TestCallbackExceptions.positive_on_error (26 ms)

@jacobperron
Copy link
Member

@rotu Nice, thanks for looking into it!

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@jacobperron
Copy link
Member

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@rotu
Copy link
Contributor

rotu commented Jul 11, 2019

The suspense is killing me
HUZZAH! 🎆

@jacobperron jacobperron merged commit 207bcc5 into ros2:master Jul 11, 2019
@nuclearsandwich nuclearsandwich added this to Proposed in Dashing Patch Release 3 via automation Aug 1, 2019
@nuclearsandwich nuclearsandwich moved this from Proposed to Needs Backport in Dashing Patch Release 3 Aug 2, 2019
jacobperron pushed a commit that referenced this pull request Sep 5, 2019
* Uncommented catch exception code to print error

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* put back the e

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* uncommented error printing in exception handling

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* Removed "/n" characters.
Update lifecycle_node_interface_impl.hpp

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* Fix CI issue and remove TODO

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron added a commit that referenced this pull request Sep 5, 2019
* Uncommented catch exception code to print error

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* put back the e

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* uncommented error printing in exception handling

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* Removed "/n" characters.
Update lifecycle_node_interface_impl.hpp

Signed-off-by: Yathartha Tuladhar <yathartha3@gmail.com>

* Fix CI issue and remove TODO

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
@yathartha3 yathartha3 deleted the fix_error_print branch November 9, 2019 19:48
nnmm pushed a commit to ApexAI/rclcpp that referenced this pull request Jul 9, 2022
Signed-off-by: Michel Hidalgo <michel@ekumenlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants