-
Notifications
You must be signed in to change notification settings - Fork 21
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
Add exception handler #7
Conversation
35e4a12
to
5ce1aba
Compare
5ce1aba
to
bd828aa
Compare
To keep barbeque.gem simple, I changed |
pluggable 👍 |
module Barbeque | ||
module ExceptionHandler | ||
def self.handle_exception(e) | ||
handler = const_get(Barbeque.config.exception_handler, false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, const_get
takes a cost so you might like to memorize handler
like @handler ||= const_get(Barbeque.config.exception_handler, false)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed b4ea76e
LGTM |
Background
Raven.capture_exception
.Raven
.Barbeque::Worker
must be rescued and given to this exception handler.Changes
Add exception handler to handle exception with
Rails.logger
orRaven
.Please review 👓 @cookpad/dev-infra