PyBNF printing functions (pybnf.printing)¶
Contains printing commands that respect the application-wide verbosity setting.
- exception pybnf.printing.PybnfError(log_message, user_message=None, hint=None)[source]¶
Represents a user-generated error for which we can provide an informative message to the user about what went wrong with the input before quitting.
Two independent knobs shape what the user sees.
user_messagereplaces the log message – for a diagnosis that is too technical to show as-is, restated in user-facing terms.hintappends to it – for the remedy the user needs alongside the diagnosis, not instead of it. A refusal that carries only a generic remedy inuser_messagesilently discards its own reason (#527): the reason reaches the log and the user is told to give up without being told what to fix.