From: Oliver Jowett <oliver@opencloud.com>
To: Michael Allman <msa@allman.ms>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: jdbc xa patches
Date: Wed, 27 Jul 2005 17:33:13 +1200
Message-ID: <42E71C99.7040605@opencloud.com> (raw)
In-Reply-To: <20050727011008.W74424@yvyyl>
References: <20050726193540.M74424@yvyyl>
<42E6D231.8090002@opencloud.com>
<42E6E2AD.9010104@opencloud.com>
<20050726232828.S74424@yvyyl>
<42E70EFE.20600@opencloud.com>
<20050727011008.W74424@yvyyl>
Michael Allman wrote:
> On Wed, 27 Jul 2005, Oliver Jowett wrote:
>
>> I absolutely disagree with there being no benefit. We should provide
>> as much information as possible in the exception. All hhe TM *has* to
>> log is the exception we give it, really, so that better have all the
>> information we can give about any underlying problems.
>
> In cases where an XAException is thrown due to another exception, say
> SQLException, I believe I was consistent in writing the cause
> exception's stack trace to the DriverManager's log writer. I think that
> covers logging cause exceptions for the most part.
Logging stack traces to the log writer isn't acceptable really, you have
no idea whether that's going somewhere that is useful. The
implementation of the standard java.sql classes means that the log
writer isn't useful for much beyond debugging, you pretty much have to
disable it for any production use. Also, the rest of the driver chains
exceptions rather than use the log writer in similar situations -- why
is the XA code special?
> I'm not really disputing that putting nice string messages in all our
> thrown exceptions is bad, just that in this particular use case it's
> probably not worth the effort. (The effort being dealing with the fact
> that XAException does not take an error code and string message at once.)
Put it this way: I consider generating useful exceptions a prerequisite
for new code going into CVS.
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, msa@allman.ms
Subject: Re: jdbc xa patches
In-Reply-To: <42E71C99.7040605@opencloud.com>
References: <20050726193540.M74424@yvyyl> <42E6D231.8090002@opencloud.com> <42E6E2AD.9010104@opencloud.com> <20050726232828.S74424@yvyyl> <42E70EFE.20600@opencloud.com> <20050727011008.W74424@yvyyl> <42E71C99.7040605@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox