mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
* 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>
17 lines
352 B
Python
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)
|