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

Improved warning reporting infrastructure #7841

Open
PeterJohnson opened this issue Mar 1, 2025 · 0 comments
Open

Improved warning reporting infrastructure #7841

PeterJohnson opened this issue Mar 1, 2025 · 0 comments
Labels
type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Comments

@PeterJohnson
Copy link
Member

WPILib generally minimizes the use of exceptions so that user code can continue to operate in a match even in the presence of unexpected inputs. However, this behavior can make it harder for inexperienced users to debug potential issues in their code (such as out-of-range inputs or units errors). We provide telemetry infrastructure to help, but users need to have the knowledge/skills to apply it.

The only other option at present for WPILib classes to report potential user bugs of this kind is by printing a message to the console or using the DS ReportWarning functionality--this is very spammy (as functions can often be called every 20 ms or even multiple times per teleop loop).

It would be helpful to have a way for WPILib classes to report warnings in a way that doesn't crash the program and doesn't spam the console, but rather make that feedback available in another way (ala the "problems" tab in vscode). It would also be good if the warnings could be turned into errors/exceptions at user option for unit tests.

Potentially this could be added into the recently added Alert infrastructure?

@PeterJohnson PeterJohnson added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Mar 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Brand new functionality, features, pages, workflows, endpoints, etc.
Projects
None yet
Development

No branches or pull requests

1 participant