mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 10:11:52 +00:00
17 lines
362 B
Python
17 lines
362 B
Python
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)
|