Add extensions for class-based error handler

This commit is contained in:
Alex Root Junior 2020-04-12 23:29:10 +03:00
parent 0fbd2819f9
commit 01c6303d67
3 changed files with 43 additions and 3 deletions

View file

@ -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)