You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd propose that you add a config option config['reg_printerror'] or similar to allow suppression of pm.utility.print_error and pm.utility.print_warn output to the stdout. Those outputs are helpful when doing command line programming, but can be an obstacle to try: except: structures meant to handle the error.
Example: To generate a constant entropy line on a pv diagram, you pass a list of pressures at a fixed entropy to T_s(p=p, s=s). There are some conditions where the list of pressures would make T exceed the maximum allowable T, so you could use a try: except pm.utility.PMParamError: structure to catch the error and retry with a limited pressure range in that case. It's useful not to have the error hit the stdout, since it's being handled. This is especially true when we're doing this for cgi figures in pyrodoc, where the stdout is generating useful code/image data.
The text was updated successfully, but these errors were encountered:
This is now written in to the planned release for 2.2.0. There will be configuration parameters that allow users to mute error and warning messages. Thanks for the idea!
I'd propose that you add a config option
config['reg_printerror']
or similar to allow suppression ofpm.utility.print_error
andpm.utility.print_warn
output to the stdout. Those outputs are helpful when doing command line programming, but can be an obstacle totry: except:
structures meant to handle the error.Example: To generate a constant entropy line on a pv diagram, you pass a list of pressures at a fixed entropy to T_s(p=p, s=s). There are some conditions where the list of pressures would make T exceed the maximum allowable T, so you could use a
try: except pm.utility.PMParamError:
structure to catch the error and retry with a limited pressure range in that case. It's useful not to have the error hit the stdout, since it's being handled. This is especially true when we're doing this for cgi figures in pyrodoc, where the stdout is generating useful code/image data.The text was updated successfully, but these errors were encountered: