1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-23 19:44:20 +00:00

Add possible command exceptions

This commit is contained in:
Steffo 2019-03-15 14:57:13 +01:00
parent 836ac46261
commit 144ff53752
2 changed files with 12 additions and 2 deletions

View file

@ -1,6 +1,6 @@
from .asyncify import asyncify from .asyncify import asyncify
from .call import Call from .call import Call
from .command import Command from .command import Command, InvalidInputError, UnsupportedError
from .safeformat import safeformat from .safeformat import safeformat
__all__ = ["asyncify", "Call", "Command", "safeformat"] __all__ = ["asyncify", "Call", "Command", "safeformat", "InvalidInputError", "UnsupportedError"]

View file

@ -3,6 +3,16 @@ if typing.TYPE_CHECKING:
from .call import Call from .call import Call
class UnsupportedError(Exception):
"""The command is not supported for the specified source."""
pass
class InvalidInputError(Exception):
"""The command has received invalid input and cannot complete."""
pass
class Command: class Command:
"""A generic command, called from any source.""" """A generic command, called from any source."""