aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
Diffstat (limited to 'discord')
-rw-r--r--discord/errors.py10
1 files changed, 8 insertions, 2 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