mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add extensions for class-based error handler
This commit is contained in:
parent
0fbd2819f9
commit
01c6303d67
3 changed files with 43 additions and 3 deletions
|
|
@ -7,3 +7,11 @@ 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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue