Open ken-lauer opened 2 months ago
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 EVAL001
short for "unstable orbit at evaluation point")?
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")