Improve JI error reporting when Java method resolution fails
------------------------------------------------------------
Key: JRUBY-3002
URL: http://jira.codehaus.org/browse/JRUBY-3002
Project: JRuby
Issue Type: Improvement
Components: Java Integration
Affects Versions: JRuby 1.1.4
Reporter: Thomas E Enebo
Assignee: Thomas E Enebo
Fix For: JRuby 1.1.5
Our errors when we cannot properly bind to a Java method are pretty unhelpful.
We indicate 'class org.jruby.java.proxies.ConcreteJavaProxy' for all wrapped
Java objects when we should report actual Java type. Here is how the error
message looks before and after my fix:
before:
{noformat}
/Users/enebo/jruby/libraries/jme/lib/jme.rb:67:in `initialize': no constructor
with arguments matching [class org.jruby.RubyString, class
org.jruby.RubyFixnum, class org.jruby.RubyFixnum, class org.jruby.RubyFixnum,
class org.jruby.java.proxies.ConcreteJavaProxy] on object
#<SpherePlus:0xbb73b0> (NameError)
{noformat}
after:
{noformat}
/Users/enebo/jruby/libraries/jme/lib/jme.rb:67:in `initialize': no constructor
with arguments matching [class org.jruby.RubyString, class
org.jruby.RubyFixnum, class org.jruby.RubyFixnum, class org.jruby.RubyFixnum,
class com.jme.bounding.BoundingSphere] on object #<SpherePlus:0x86787c>
(NameError)
{noformat}
The Ruby objects still report their type accurately and the Java objects report
their real type which should make debugging much easier.
--
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