-
Notifications
You must be signed in to change notification settings - Fork 911
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
Don't need to see the full stack trace for ResourceNotFound #1147
Don't need to see the full stack trace for ResourceNotFound #1147
Conversation
…er typed in something wrong, or is missing a package, or hasn't sourced the setup script.
Thanks for the patch.
I don't know the answer out of my head. You will need to trace all function calls recursively to find out.
Same goes for the newly added case. Do you want to update the PR for that? I don't mind to merge it as-is or with all three blocks merged. |
What is a good way to trigger an RLException or a ValueError? (Is there already a discussion about adding the ability to provide the name and line number of a file where it generates an exception or otherwise a problem is noticed?) |
Generate an RLException:
(or many other variations where param is spelled wrong, or name, or command) |
The current patch looks good to me. Do you want to keep iterating on it to cover more cases or should it be merged as is?
I am not aware of any effort towards such a feature. One problem for this will be that test coverage is very low and the code based not clean and therefore for any change side effects / regressions are highly likely. That was the main reason why other patches to |
Let's merge this, I'll make a separate pr for other cases later, and hopefully also generate some tests for them, but it may take a while. Also I may not have been clear above (though your answer sounds applicable regardless): the files I want names and line numbers of errors out of are the .launch files. |
I guessed so 😉 Sounds like a nice feature. |
The user typed in something wrong, or is missing a package, or hasn't sourced the right setup script.
The example that prompted this was using $(find package) where that package wasn't on the path:
The result is a screen full of traceback, followed by a screen full of ROS path output, the line that explains which package wasn't found was sandwiched in-between and is easy to miss.
This eliminates the traceback (but still a lot of ROS path with catkin tools with a workspace with a lot of packages).
Are there other exceptions that are similar that ought to be handled the same?
It would be nice to consolidate the duplicate code in ValueError and RLException above this.