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

Handle InvalidTopicNameException in Publisher Initialization #1

Open
wants to merge 1 commit into
base: twiststamped
Choose a base branch
from

Conversation

KentaKato
Copy link

Issue

When an invalid topic name is provided, the self._node.create_publisher throws an InvalidTopicNameException , leading to a crash in the GUI.

Resolution:

This pull request introduces a try-except block around the publisher initialization logic. If an InvalidTopicNameException is caught, self._publisher is safely set to None, preventing the GUI from crashing and allowing the application to handle the error gracefully.

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.

1 participant