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
What would be in these notes that wouldn't go in the message directly? The example in the docs is for errors raised elsewhere and caught, but that can also be done with raise New("") from old. And I don't think these errors are expected to be caught and modified either way.
What would be in these notes that wouldn't go in the message directly?
For sure this would not bring anything click can't already do. This would just be for convenience.
After having used add_note a bit, I would have naively expected click exception display to behave a bit like uncatched python exception display, i.e. to display the notes.
For the record, the situations where I find it useful is to re-raise an exception with more context:
Since 3.11 Python supports adding notes on exceptions. Basically this is completion of the exception message, and it can be useful to add context.
Notes are currently not displayed when
ClickException
are raised:I suggest to display the notes in addition to the main message.
What do you think?
The text was updated successfully, but these errors were encountered: