Skip to content
This repository was archived by the owner on May 17, 2022. It is now read-only.

Commit fa799c6

Browse files
committed
error handler added
1 parent b7f12fb commit fa799c6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

decorators.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,14 @@ def decorator_handler(handler:Handler):
106106
else:
107107
return decorator_handler
108108

109+
def errorHandler(self, func):
110+
logging.debug(f'add error handler => {func}')
111+
try:
112+
self.dispatcher.add_error_handler(func)
113+
except:
114+
logging.exception('exception while trying to add the error handler')
115+
BugReporter.exception('exception while trying to the error handler')
116+
109117
class ConversationDecorator:
110118
def __init__(self, entry_points:List[Handler], **kwargs):
111119
self.entry_points = entry_points

0 commit comments

Comments
 (0)