NestedException patch (Re: Embed E in Java)

Thomas Leonard <tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]>
Newsgroups gmane.comp.lang.e.general
Organization IT Innovation
Message-ID <[email protected]>
On Tue, 2010-01-12 at 21:55 -0500, Kevin Reid wrote:
> On Oct 21, 2009, at 13:25, Mark Miller wrote:
> > On Tue, Oct 20, 2009 at 9:17 AM, Kevin Reid <[email protected]> wrote:
> >> MarkM: Is there a non-historical reason NestedException/
> >> NestedThrowable/etc exist instead of using the Java 1.4
> >> Throwable.getCause() mechanism?
> >
> > Mostly history. The NestedException,.. mechanism predates Java 1.4.
> > Since it worked, I have never examined the new getCause() API. I do
> > not know whether or not it would be safe to use instead.
> 
> [rest of thread omitted]
> 
> Here's my draft patch for this. Please review.

I notice that this change makes Java 1.6 the minimum supported version:

    public EBacktraceIOException(Throwable t, String msg) {
        super(msg, t);
    }

This IOException constructor isn't in 1.5:

http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html

It's not a problem for me, but it might be worth using initCause
instead.


-- 
Dr Thomas Leonard
IT Innovation Centre
2 Venture Road
Southampton
Hampshire SO16 7NP

Tel: +44 0 23 8076 0834
Fax: +44 0 23 8076 0833
mailto:tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected]
http://www.it-innovation.soton.ac.uk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.