[Kaffe] problem with stack traces

Archie Cobbs archie at whistle.com
Wed Feb 3 23:26:24 PST 1999


Tony Kimball writes:
> : Mo, I implemented a quick version and checked it in:
> : It's not as pretty as Sun's which prints the basename of a SourceFile only,
> : but maybe we don't want that anyway cause it could be ambiguous.
> 
> One is always reluctant to make a statement which might be interpreted
> as a request for someone else to write code, but that fear
> notwithstanding, I will mention, just FYI, that it is a marginally
> common practice to find one's callers by parsing the output of
>     (new Exception("traceback")).printStackTrace()
> I say "marginally common" because I have personal knowledge of at
> least three persons who have independently implemented such code!
> 
> It would much simplify such code, if Kaffe could format tracebacks
> more nearly compatibly -- i.e. use the same separator characters, and
> significant elements per line, whitespace not being important.  (In
> the best of all possible worlds, Kaffe would set an example so good
> that Sun elects to standardize it, and implement a call-stack query
> extension to the reflection interface:-)  But I won't hold my breath.)

Yeah, I think we should "look like" Sun if at all possible. And to
your latter point, I filed a bug with Sun a while back requesting
that they create a class java.lang.StackTrace.. they didn't do it
though.

Then you could say System.out.println(e.getStackTrace()), etc.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


More information about the kaffe mailing list