-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add ability to filter certain error messages #85
Comments
Yes, there are a few like this that aren't quite "errors" to me. @DavidSagan what do you consider an "error" vs "warning"? |
Essentially, an error occurs when "unexpectedly" the computation cannot be done. The problem is that where you draw the line is somewhat arbitrary. |
@DavidSagan I imagine it would be a massive effort to give all such errors a uniquely identifiable code (such as the above might be If we had some way of identifying the errors with unique codes, it'd be much easier for the user to opt out of certain messages or reclassify them as fatal/ignorable/etc. |
About 1800 lines give or take. But something someone with only a little training could do. I think better would be to enable the User to opt out using the routine name generating the error which is already something that PyTao knows about. |
Another thought is to add more error levels for finer control. |
Raising
RuntimeError
for certain errors is undesirable, depending on what the user is trying to do. This seems to be a recurring theme based on what I've heard and recently reported issues (#84)If
pytao
could filter user-defined message classes such as these and redirect them to the logging system, maybe that would be a good solution? (cc @ChristopherMayes )For example:
Not sure how it would look, but perhaps some simple string match like this could be fine:
tao.ignore_error("tao_set_invalid", "UNSTABLE ORBIT")
The text was updated successfully, but these errors were encountered: