Proper exception chaining.

This commit is contained in:
Rapptz
2016-01-13 20:08:55 -05:00
parent bbe6455eb9
commit 4edff12f6b
3 changed files with 7 additions and 7 deletions

View File

@@ -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