Add exceptions
This commit is contained in:
parent
de3ca975a2
commit
145cbe5fe2
2 changed files with 42 additions and 0 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
from .callbacks import Callbacks
|
from .callbacks import Callbacks
|
||||||
from .connection import Connection
|
from .connection import Connection
|
||||||
|
from .exceptions import *
|
||||||
from .session import Session
|
from .session import Session
|
||||||
from .message import Message
|
from .message import Message
|
||||||
from .sessions import Sessions
|
from .sessions import Sessions
|
||||||
|
|
|
||||||
41
yaboli/exceptions.py
Normal file
41
yaboli/exceptions.py
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
class YaboliException(Exception):
|
||||||
|
"""
|
||||||
|
Generic yaboli exception class.
|
||||||
|
"""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
class BotManagerException(YaboliException):
|
||||||
|
"""
|
||||||
|
Generic BotManager exception class.
|
||||||
|
"""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
class CreateBotException(BotManagerException):
|
||||||
|
"""
|
||||||
|
This exception will be raised when BotManager could not create a bot.
|
||||||
|
"""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
class BotNotFoundException(BotManagerException):
|
||||||
|
"""
|
||||||
|
This exception will be raised when BotManager could not find a bot.
|
||||||
|
"""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
class BotException(YaboliException):
|
||||||
|
"""
|
||||||
|
Generic Bot exception class.
|
||||||
|
"""
|
||||||
|
|
||||||
|
pass
|
||||||
|
|
||||||
|
class ParseMessageException(BotException):
|
||||||
|
"""
|
||||||
|
This exception will be raised when a failure parsing a message occurs.
|
||||||
|
"""
|
||||||
|
|
||||||
|
pass
|
||||||
Loading…
Add table
Add a link
Reference in a new issue