Add InvalidArgument exception and change exceptions thrown.

This commit is contained in:
Rapptz committed 2015-10-27 21:25:21 -04:00
1 parent 027b7b33c9
commit 9b2a78a031
3 files changed
+19 -7

No files matched your search

+10
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