| Total Complexity | 1 |
| Total Lines | 14 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | """ |
||
| 2 | Processes all exceptions that occur in runtime. |
||
| 3 | """ |
||
| 4 | import logging |
||
| 5 | |||
| 6 | from pincer import Cog, Client |
||
| 7 | |||
| 8 | |||
| 9 | class ErrorHandler(Cog): |
||
| 10 | @Client.event |
||
| 11 | async def on_error(self, error: Exception, *args, **kwargs): |
||
| 12 | # You should probably handle this more specific |
||
| 13 | logging.error(error) |
||
| 14 |