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

Idea: ensure rake integration is enabled when rescue_rake_exceptions is true #292

Nitrodist opened this issue May 13, 2014 · 3 comments


Copy link

@Nitrodist Nitrodist commented May 13, 2014

I ran into a bit of an issue where I thought I had enabled the rake integration in my ruby project but it turns out that airbrake wasn't sending the exceptions to airbrake (even though I had airbrake required and rescue_rake_exceptions was set true).

As it turns out (and in the cucumber spec), one must require airbrake/rake_handler for it to work. Without this required, then the exceptions won't be sent to Airbrake (silently not sending).

Given the nature of rake tasks, I think that if the setting for rescuing from rake exceptions is set to true, then we should ensure that the rake integration is enabled via one or two ways:

  1. Raise an exception at run-time if the airbrake/rake_handler isn't loaded when rescue_rake_exceptions is set to true
  2. Automatically load airbrake/rake_handler after rescue_rake_exceptions is enabled.

I'm willing to do the work to get this going, but I'd like to know which one is the appropriate way to do it before working on it.

Copy link

@alif alif commented May 14, 2014

Either approach seems like it might be acceptable.
We're discussing this one internally. We'll let you know soon!

Copy link

@alif alif commented May 16, 2014

I think option 1. is the best. It's less intrusive and less complicated. I'll keep an eye out for your PR.

Nitrodist added a commit to Nitrodist/airbrake that referenced this issue May 16, 2014
An LoadError exception is now raised when the client is configured to
rescue from rake exceptions and airbrake/rake_handler has not been

Fixes airbrake#292
Copy link
Contributor Author

@Nitrodist Nitrodist commented May 16, 2014

It lives. #294

@alif alif closed this in #294 May 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants