Re: [jruby-user] Convert Ruby Exceptions to Java
Theo Hultberg <[email protected]>
| Newsgroups | gmane.comp.lang.jruby.user |
|---|---|
| Message-ID | <CAMR1f-eLcwf59MOqUG881Mhe8YRKNYVB1tyOi+9+9A=Qne-YVA@mail.gmail.com> |
when Ruby exception bubble into Java they are wrapped in instances of RaiseException, a subclass of RuntimeException. The constructor of RaiseException takes a RubyException so they should do the job: https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/exceptions/RaiseException.java T# On Mon, Aug 4, 2014 at 3:40 PM, Ariel Valentin <[email protected]> wrote: > Is anyone aware of a convenient way to convert Ruby exceptions into Java > Throwable? I am trying to use an slf4j logger to log Ruby errors. > > Thanks, > Ariel Valentin > e-mail: [email protected] > website: http://blog.arielvalentin.com > skype: ariel.s.valentin > twitter: arielvalentin > linkedin: http://www.linkedin.com/profile/view?id=8996534 > --------------------------------------- > *simplicity *communication > *feedback *courage *respect >