From 4edff12f6bd711e546d5cdc29663cece8c2ba4a9 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Wed, 13 Jan 2016 20:08:55 -0500 Subject: Proper exception chaining. --- discord/ext/commands/bot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'discord/ext/commands/bot.py') diff --git a/discord/ext/commands/bot.py b/discord/ext/commands/bot.py index 9507dbe2..24e1d4b9 100644 --- a/discord/ext/commands/bot.py +++ b/discord/ext/commands/bot.py @@ -456,8 +456,8 @@ class Bot(GroupMixin, discord.Client): lib = importlib.import_module(name) try: lib.setup(self) - except AttributeError: - raise discord.ClientException('extension does not have a setup function') + except AttributeError as e: + raise discord.ClientException('extension does not have a setup function') from e self.extensions[name] = lib -- cgit v1.2.3