Skip to content

Conversation

waltner
Copy link

@waltner waltner commented Sep 30, 2020

Allow for _send to fail silently without printing the error message. Often it is useful to handle (and print) the error outside the _send function. This commit adds a print_err argument (defaults to True), so to suppress the error printing one can simply set this to False.

This should be especially useful if more sophisticated error handling and logging is implemented to customize the errors without having prints that are neither formatted nor have any debug level associated to it.

Allow for `_send` to fail silently without printing the error message. Often it is useful to handle (and print) the error outside the `_send` function. This commit adds a `print_err` argument (defaults to True), so to suppress the error printing one can simply set this to False.
@waltner waltner changed the title Add parameter to allow error printing suppression feat: Add parameter to allow error printing suppression Sep 30, 2020
@waltner
Copy link
Author

waltner commented Sep 30, 2020

Just saw that there are some PRs that go into the same direction (#16, #19) so there is need for such a solution. I would propose to user logging (+ use of log levels) as in #19, as it is part of the Python standard library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant