Re: [jruby-dev] jruby and anonymous inner classes

2008-04-24 Thread mnwicket
Wicket is much like swing when it comes to using anonymous inner classes...so here is simple wicket example with is very common to wicket; This Link object is a common component available in wicket...just trying to show the structure. class abstract Link extends Component { public Link(String

Re: [jruby-dev] Including interpreted Ruby frames in Java stack trace

2008-04-24 Thread Charles Oliver Nutter
Peter K Chan wrote: Charles, I tried out the patch, but there is a small bug: the expression implementationClass.getBaseName() sometimes return null, thus causing a NPE when constructing a StackTraceElement. I am a little confused about the purpose of the patch though. Is it s

RE: [jruby-dev] Including interpreted Ruby frames in Java stack trace

2008-04-24 Thread Peter K Chan
That makes sense. My own interest would be mostly on handling unchecked exception, since I am interested in catching internal JRuby exceptions, which are all unchecked (NPE, CCE, etc.). Peter -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charles Olive

Re: [jruby-dev] Including interpreted Ruby frames in Java stack trace

2008-04-24 Thread Charles Oliver Nutter
Charles Oliver Nutter wrote: The only hope for being able to re-throw a checked exception without declaring that I'm throwing it would be to generate non-Java bytecode that does the throw for me. But I will give it a try with unchecked exceptions and see how it goes. Attached is an updated ve

[jruby-dev] Catchable Java RuntimeExceptions

2008-04-24 Thread Charles Oliver Nutter
Attached is a patch to DefaultMethod that attempts to wrap all RuntimeException instances passing through it with a Ruby NativeException, allowing you to catch them as normal. Consider it an experimental start. There are caveats: - Since the script you specify on the command line immediately

Re: [jruby-dev] jruby and anonymous inner classes

2008-04-24 Thread Charles Oliver Nutter
mnwicket wrote: So I understand that jruby can create a class impl at any time...but can it handle the above situation...the difference being the impl is an abstract class. Ahh I seewell we can extend abstract classes, but I don't think we have a shortcut syntax that would work for it. Wha

Re: [jruby-dev] Catchable Java RuntimeExceptions

2008-04-24 Thread MenTaLguY
How about only doing the capture and conversion of Java exceptions when compiling/interpreting a begin...rescue block with a clause that traps NativeExceptions? You don't need to do the conversion all the time (and in fact the performance hit from the conversion sounds very unappealing) if you're

Re: [jruby-dev] Catchable Java RuntimeExceptions

2008-04-24 Thread MenTaLguY
On Thu, 24 Apr 2008 12:35:50 -0700, MenTaLguY <[EMAIL PROTECTED]> wrote: > How about only doing the capture and conversion of Java exceptions when > compiling/interpreting a begin...rescue block with a clause that traps > NativeExceptions? Argh, forgot that the exception class can be an arbitrary

Re: [jruby-dev] Catchable Java RuntimeExceptions

2008-04-24 Thread Charles Oliver Nutter
MenTaLguY wrote: How about only doing the capture and conversion of Java exceptions when compiling/interpreting a begin...rescue block with a clause that traps NativeExceptions? You don't need to do the conversion all the time (and in fact the performance hit from the conversion sounds very unap

Re: [jruby-dev] Catchable Java RuntimeExceptions

2008-04-24 Thread MenTaLguY
On Thu, 24 Apr 2008 13:26:59 -0700, MenTaLguY <[EMAIL PROTECTED]> wrote: > On Thu, 24 Apr 2008 12:35:50 -0700, MenTaLguY <[EMAIL PROTECTED]> wrote: >> How about only doing the capture and conversion of Java exceptions when >> compiling/interpreting a begin...rescue block with a clause that traps >>

Re: [jruby-dev] Catchable Java RuntimeExceptions

2008-04-24 Thread Charles Oliver Nutter
MenTaLguY wrote: How about only doing the capture and conversion of Java exceptions when compiling/interpreting a begin...rescue block with a clause that traps NativeExceptions? You don't need to do the conversion all the time (and in fact the performance hit from the conversion sounds very unap

[jruby-dev] [jira] Created: (JRUBY-2439) Trying to subclass a Java class from a signed .jar will crash on you.

2008-04-24 Thread Jeremy Ashkenas (JIRA)
Trying to subclass a Java class from a signed .jar will crash on you. - Key: JRUBY-2439 URL: http://jira.codehaus.org/browse/JRUBY-2439 Project: JRuby Issue Type: Bug

[jruby-dev] [jira] Created: (JRUBY-2440) mongrel_jcluster does not work in JRuby 1.1

2008-04-24 Thread Brandon Hauff (JIRA)
mongrel_jcluster does not work in JRuby 1.1 --- Key: JRUBY-2440 URL: http://jira.codehaus.org/browse/JRUBY-2440 Project: JRuby Issue Type: Bug Components: JRuby-extras Affects Versions: J

[jruby-dev] [jira] Created: (JRUBY-2441) Delay creation of ObjectAllocator instances until first use

2008-04-24 Thread Wayne Meissner (JIRA)
Delay creation of ObjectAllocator instances until first use --- Key: JRUBY-2441 URL: http://jira.codehaus.org/browse/JRUBY-2441 Project: JRuby Issue Type: Improvement Report