2022-06-26 12:59:36 +00:00
|
|
|
class AlreadyInConversationError(Exception):
|
|
|
|
"""
|
|
|
|
Occurs when another exclusive conversation is opened in the same chat.
|
|
|
|
"""
|
2023-03-12 03:56:01 +00:00
|
|
|
|
2022-06-26 12:59:36 +00:00
|
|
|
def __init__(self):
|
|
|
|
super().__init__(
|
|
|
|
"Cannot open exclusive conversation in a "
|
|
|
|
"chat that already has one open conversation"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
class TimeoutConversationError(Exception):
|
|
|
|
"""
|
|
|
|
Occurs when the conversation times out.
|
|
|
|
"""
|
2023-03-12 03:56:01 +00:00
|
|
|
|
2022-06-26 12:59:36 +00:00
|
|
|
def __init__(self):
|
2023-03-12 03:56:01 +00:00
|
|
|
super().__init__("Response read timed out")
|
2022-06-30 06:49:03 +00:00
|
|
|
|
|
|
|
|
|
|
|
class ListenerCanceled(Exception):
|
|
|
|
"""
|
|
|
|
Occurs when the listener is canceled.
|
|
|
|
"""
|
|
|
|
|
|
|
|
def __init__(self):
|
2023-03-12 03:56:01 +00:00
|
|
|
super().__init__("Listener was canceled")
|