Passed
Pull Request — main (#453)
by
unknown
04:03 queued 01:58
created

error_handler   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 7
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A ErrorHandler.on_error() 0 4 1
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