Cannot Catch Core Java Exceptions From JRuby Internals in Ruby Code
-------------------------------------------------------------------

                 Key: JRUBY-2429
                 URL: http://jira.codehaus.org/browse/JRUBY-2429
             Project: JRuby
          Issue Type: Bug
          Components: Interpreter
    Affects Versions: JRuby 1.1
         Environment: Java 6/Windows XP
            Reporter: Peter K Chan


If a core Java exceptions, such as NullPointerException, ClassCastException, or 
ArrayIndexOufOfBoundsException, is thrown from within a JRuby internal code, 
the exception cannot be caught by any Ruby handler. This includes both 
exception coming from JRuby interpreter and any other JRuby-optimized Java code 
(such as AR-JDBC's own Internal adapter).

This is a bug and not merely a feature request, because the inability to catch 
such core Java exception makes it impossible to guard the thread against any 
unexpected exception, and directly kills the thread.

I don't have a test case, because I don't know how to intentionally trigger an 
exception inside JRuby (any such exception will presumably be a bug).

To fix this bug, these core exception should be rescue-able by Ruby code and 
also have Ruby stack traces available.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to