Add filters and class based handler for errors

This commit is contained in:
Alex Root Junior 2020-04-12 23:20:44 +03:00
parent 9e673998f0
commit 0fbd2819f9
9 changed files with 167 additions and 1 deletions

View file

@ -0,0 +1,27 @@
# Exceptions
This filters can be helpful for handling errors from the text messages.
## ExceptionTypeFilter
Allow to match exception by type
### Specification
| Argument | Type | Description |
| --- | --- | --- |
| `exception` | `#!python3 Union[Type[Exception], Tuple[Type[Exception]]]` | Exception type(s) |
## ExceptionMessageFilter
Allow to match exception by message
### Specification
| Argument | Type | Description |
| --- | --- | --- |
| `match` | `#!python3 Union[str, Pattern[str]]` | Regexp pattern |
## Allowed handlers
Allowed update types for this filters:
- `error`