Passed
Pull Request — main (#453)
by
unknown
02:14
created

error_handler.ErrorHandler.on_error()   A

Complexity

Conditions 1

Size

Total Lines 4
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nop 4
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