DRAFT PROPOSAL Pot Pourri - Augmented Stack Traces, ServiceProvider annotation and processor, Enhanced For Loop utility class
Charles Oliver Nutter
charles.nutter at sun.com
Sat Mar 1 23:42:03 PST 2008
Bruce Chapman & Barbara Carey wrote:
> Thanks for the comments.
>
> I had initially though of a similar mechanism to that. See
> http://weblogs.java.net/blog/brucechapman/archive/2007/08/index.html
>
> However that requires quite deep changes in the JVM and the JVM spec and
> probably the language.
Aim high! :)
> Regards your ruby project, I think you should be able to grab the stack
> trace for an exception, and replace it with a manufactured stack trace,
> with manufactured stack trace elements. I have been successful in using
> this technique to augment stack traces (albeit I was suffixing the
> context info after the method name with inverted parenthesis around it
> to make it look like it was another item in the stack trace element.)
I can certainly do this in cases where I can determine the appropriate
Ruby stack information, such as by mangling the class and method name I
generate to represent the actual Ruby method name. However it's much
more difficult for interpreted Ruby frames, which all essentially look
identical. I end up having to fall back on the current artificial frame
stack because those interpreted frames need backtrace information to go
*somewhere* and I can't augment the existing stack trace to include it.
- Charlie
More information about the challenge-discuss
mailing list