aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--discord/errors.py10
-rw-r--r--docs/api.rst4
2 files changed, 10 insertions, 4 deletions
diff --git a/discord/errors.py b/discord/errors.py
index 36ec3b48..e50e0386 100644
--- a/discord/errors.py
+++ b/discord/errors.py
@@ -24,10 +24,16 @@ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
"""
-class InvalidDestination(Exception):
+class DiscordException(Exception):
+ """Base exception class for discord.py
+
+ Ideally speaking, this could be caught to handle any exceptions thrown from this library.
+ """
+
+class InvalidDestination(DiscordException):
"""Thrown when the destination from :meth:`Client.send_message` is invalid."""
pass
-class GatewayNotFound(Exception):
+class GatewayNotFound(DiscordException):
"""Thrown when the gateway hub for the :class:`Client` websocket is not found."""
pass
diff --git a/docs/api.rst b/docs/api.rst
index 1ab68ca2..43efe753 100644
--- a/docs/api.rst
+++ b/docs/api.rst
@@ -282,9 +282,9 @@ Exceptions
The following exceptions are thrown by the library.
+.. autoclass:: DiscordException
+
.. autoclass:: InvalidDestination
- :members:
.. autoclass:: GatewayNotFound
- :members: