-
Notifications
You must be signed in to change notification settings - Fork 280
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
not reporting rake tasks #25
Comments
There isn't a recommended way to catch exceptions in all Rake tasks (besides your second example), but it seems like there ought to be something the gem can hook into. Investigating... |
I checked out how Airbrake does it: https://github.com/airbrake/airbrake/blob/master/lib/airbrake/rake_handler.rb and this worked for me:
What do you think? |
Just pushed this to a branch; it's basically the same as what you just posted: https://github.com/ratchetio/ratchetio-gem/compare/capture-rake-exceptions That work? Is the |
Nice! I think the only difference between that and Will this be merged into master at some point? |
Merging now... |
Merged to master and pushed version 0.7.0 to rubygems. |
Thanks! :) |
Oh heck, this was a breaking change for us - see stack. A load order issue? I'll look into it further, but downgrading to 0.6.0 fixes it. [18:42:39][Execute spec] /opt/teamcity-agent/work/6bedf4b37b77680/vendor/ruby/1.9.1/gems/ratchetio-0.7.0/lib/ratchetio/rake.rb:3:in |
That's no good :( thanks for the report. Will look into this later today. |
I'm still seeing the problem @hlascelles reported - is it fixed? Should I open a different github issue for the problem? |
@bradx3 are you on at least 0.8.2? If so, please do open a new github issue. @hlascelles figured out a fix for his setup, which made it into 0.8.2. Quoting from our email exchange, that fix was:
|
Yes, the new rollbar gem (with that require included) fixed it for me. Alternatively, you can put
at the top of your spec_helper.rb |
I'm got this gem setup in my Rails app, but it doesn't seem to catch errors inside of Rake tasks:
doesn't report anything on Ratchet, but this works:
Is this by design? It looks like this gem taps into some Rack middleware to catch exceptions which would explain why it doesn't work for Rake tasks, is there a recommended way to have it catch all my Rake tasks?
The text was updated successfully, but these errors were encountered: