Add InvalidArgument exception and change exceptions thrown.

This commit is contained in:
Rapptz
2015-10-27 21:25:21 -04:00
parent 027b7b33c9
commit 9b2a78a031
3 changed files with 19 additions and 7 deletions

View File

@ -69,3 +69,13 @@ class HTTPException(DiscordException):
message = '{0} (status code: {1.response.status_code}'.format(message, self)
super(HTTPException, self).__init__(message)
class InvalidArgument(ClientException):
"""Exception that's thrown when an argument to a function
is invalid some way (e.g. wrong value or wrong type).
This could be considered the analogous of ``ValueError`` and
``TypeError`` except derived from :exc:`ClientException` and thus
:exc:`DiscordException`.
"""
pass