mirror of
https://github.com/ada-dmitry/kurator_bot.git
synced 2026-09-24 08:10:15 +00:00
init new bot
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
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)
|
||||
Reference in New Issue
Block a user