Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Core] Fix error handling in loading extensions. #2688

Merged
merged 2 commits into from May 31, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions redbot/core/bot.py
Expand Up @@ -253,8 +253,8 @@ async def load_extension(self, spec: ModuleSpec):
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

Expand Down