aiogram.dispatcher.handler.error

aiogram/dispatcher/handler/error.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
from abc import ABC

from aiogram.dispatcher.handler.base import BaseHandler


class ErrorHandler(BaseHandler[Exception], ABC):
    """
    Base class for errors handlers
    """

    @property
    def exception_name(self) -> str:
        return self.event.__class__.__name__

    @property
    def exception_message(self) -> str:
        return str(self.event)