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

Fix early return in reaction_role_container #134

Open
dracco1993 opened this issue Nov 6, 2020 · 0 comments
Open

Fix early return in reaction_role_container #134

dracco1993 opened this issue Nov 6, 2020 · 0 comments
Assignees
Labels
bug Something isn't working ruby Pull requests that update Ruby code

Comments

@dracco1993
Copy link
Member

It looks like one of the event handlers is early returning from something, but that's not a valid thing to do in a handler. Instead, we should probably just set a flag and noop the rest of the operations or something.

Here is an example log:

020-11-06T21:38:40.462637+00:00 app[bot.1]: [ERROR : et-4914 @ 2020-11-06 21:38:40.462] Exception: #<LocalJumpError: unexpected return>
2020-11-06T21:38:40.462644+00:00 app[bot.1]: [ERROR : et-4914 @ 2020-11-06 21:38:40.462] /app/lib/bot/commands/reaction_role_container.rb:153:in `block in <class:ReactionRoleContainer>'
2020-11-06T21:38:40.462647+00:00 app[bot.1]: [ERROR : et-4914 @ 2020-11-06 21:38:40.462] /app/vendor/bundle/ruby/2.7.0/gems/discordrb-3.3.0/lib/discordrb/events/generic.rb:98:in `call'
2020-11-06T21:38:40.462682+00:00 app[bot.1]: [ERROR : et-4914 @ 2020-11-06 21:38:40.462] /app/vendor/bundle/ruby/2.7.0/gems/discordrb-3.3.0/lib/discordrb/bot.rb:1316:in `block in call_event'
@dracco1993 dracco1993 added bug Something isn't working ruby Pull requests that update Ruby code labels Nov 6, 2020
@dracco1993 dracco1993 self-assigned this Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ruby Pull requests that update Ruby code
Projects
None yet
Development

No branches or pull requests

1 participant