aiogram/aiogram/handlers/error.py
Alex Root Junior 4315ecf1a2
Dev 3.x flat package (#961)
* Move packages

* Added changelog

* Update examples/echo_bot.py

Co-authored-by: Oleg A. <t0rr@mail.ru>

* Rename `handler` -> `handlers`

* Update __init__.py

Co-authored-by: Oleg A. <t0rr@mail.ru>
2022-08-14 01:07:52 +03:00

17 lines
352 B
Python

from abc import ABC
from aiogram.handlers.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)