[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Chained Exceptions and StackTraceElement support
From: |
Mark Wielaard |
Subject: |
Chained Exceptions and StackTraceElement support |
Date: |
Tue, 10 Jul 2001 03:01:31 +0200 |
User-agent: |
Mutt/1.3.18i |
Hi,
The 1.4 spec finally defines a generic Exception chaining mechanism
so you don't have to implement this in an ad hoc way for every project.
It also defines a general StackTraceElement that can be used to inspect
the call stack of an exception. I have seen people do this by parsing the
output of printStackTrace which is clever, but not really portable or
reliably.
The attached patch implements the Java side of this. I am not going to
check this in because I have not yet looked at the serialization issues.
It is attached so that people know what I am working on.
I was hoping that we could use the java version of printStackTrace and
let the VM only handle the fillInStackTrace() <-> StackTraceElement side
of things. This might be doable for japhar as far as I can understand the
code. But for libgcj this might be a bit more difficuly since it seems
to use external programs (addr2line and c++filt) through pipes to get
and print this information.
Cheers,
Mark
--
Stuff to read:
<http://www.toad.com/gnu/whatswrong.html>
What's Wrong with Copy Protection, by John Gilmore
throwable.diff
Description: Text document
- Chained Exceptions and StackTraceElement support,
Mark Wielaard <=