2020-06-30 10:13:58 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
|
2020-07-25 12:28:30 +08:00
|
|
|
class IgnoredException(Exception):
|
|
|
|
"""
|
|
|
|
Raised by event_preprocessor indicating that
|
|
|
|
the bot should ignore the event
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self, reason):
|
|
|
|
"""
|
|
|
|
:param reason: reason to ignore the event
|
|
|
|
"""
|
|
|
|
self.reason = reason
|
|
|
|
|
|
|
|
|
2020-05-05 16:11:05 +08:00
|
|
|
class PausedException(Exception):
|
|
|
|
"""Block a message from further handling and try to receive a new message"""
|
2020-05-02 20:03:36 +08:00
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
class RejectedException(Exception):
|
|
|
|
"""Reject a message and return current handler back"""
|
|
|
|
pass
|
2020-05-05 16:11:05 +08:00
|
|
|
|
|
|
|
|
|
|
|
class FinishedException(Exception):
|
|
|
|
"""Finish handling a message"""
|
|
|
|
pass
|