mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[Core] Fix error handling in loading extensions. (#2688)
* fixes 2687 * raise the right exception
This commit is contained in:
parent
3ca2a9af28
commit
0e9086ca1f
@ -261,8 +261,8 @@ class RedBase(commands.GroupMixin, commands.bot.BotBase, RPCMixin):
|
||||
lib.setup(self)
|
||||
except Exception as e:
|
||||
self._remove_module_references(lib.__name__)
|
||||
self._call_module_finalizers(lib, key)
|
||||
raise errors.ExtensionFailed(key, e) from e
|
||||
self._call_module_finalizers(lib, name)
|
||||
raise errors.CogLoadError() from e
|
||||
else:
|
||||
self._BotBase__extensions[name] = lib
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user