-
Notifications
You must be signed in to change notification settings - Fork 436
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
StackFrame#from_exception should not fail with native java exceptions #105
StackFrame#from_exception should not fail with native java exceptions #105
Conversation
…iddleware main rescue and add specs for that.
I'm not sure what I think of this to be honest. I would like to support all kinds of exceptions in all Ruby implementations, but it annoys me that |
I think I made it more complicated than is actually is. What I really wanted to fix in this PR is failing on missing I'll update code tomorrow. |
@charliesome please take a look at this now.
You might have to install json gem for JRuby 1.6.8 - not sure if this should be included in |
json is in the standard library as of Ruby 1.9. If you're running JRuby in 1.9 mode, shouldn't json be present without having to use a gem? |
I guess it is a bug in JRuby, however I can't find actual bug report for this. When testing on 1.6.x I was getting LoadError for rvm 1.7.0 do jruby -r rubygems -e "puts require('json')" # => true
rvm 1.6.8 do jruby --1.9 -r rubygems -e "puts require('json')"
LoadError: no such file to load -- json
require at org/jruby/RubyKernel.java:1071
.. |
@charliesome - any updates for this issues? |
This problem still occurs with better_errors 0.9.0 and JRuby 1.7.4 |
@charliesome - any updates on this? |
Currently on JRuby versions 1.6.8, 1.7.0, 1.7.1, 1.7.2, You can run into error:
This is simple fix to not fail with undefined method. I've added missing method to all native java exceptions - for now it returns empty array, just to fallback to #backtrace in StackFrame#from_exception.
I also updated .gemspec work with jruby 1.6.8.
I'm not sure how to write specs for that kind of 'platform specific' features. Maybe it would be good idea to put them into separate file? Any suggestions are welcome.