Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 24311 invoked from network); 25 May 2007 12:04:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 May 2007 12:04:43 -0000 Received: (qmail 54636 invoked by uid 500); 25 May 2007 12:04:48 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 54418 invoked by uid 500); 25 May 2007 12:04:47 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 54409 invoked by uid 99); 25 May 2007 12:04:47 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2007 05:04:47 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 25 May 2007 05:04:41 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D113471403E for ; Fri, 25 May 2007 05:04:20 -0700 (PDT) Message-ID: <13884776.1180094659779.JavaMail.jira@brutus> Date: Fri, 25 May 2007 05:04:19 -0700 (PDT) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-2472) Use Throwable.initCause() to improve error reporting In-Reply-To: <17338071.1174471232368.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen updated DERBY-2472: -------------------------------------- Attachment: initCause.stat initCause.diff Attaching initCause.diff which removes the possibly dangerous use of initCause(). After a discussion on derby-dev, I chose to go for a solution where only the first exception caught is re-thrown. This is because it might be confusing for users to get a caused-by chain when the exceptions are not necessarily caused by eachother, and the code will be very complex for little added value if we want to do the chaining. Derbyall and suites.All ran cleanly on Sun Java 1.6. > Use Throwable.initCause() to improve error reporting > ---------------------------------------------------- > > Key: DERBY-2472 > URL: https://issues.apache.org/jira/browse/DERBY-2472 > Project: Derby > Issue Type: Improvement > Components: JDBC, Miscellaneous > Affects Versions: 10.3.0.0 > Reporter: Kristian Waagan > Assigned To: Knut Anders Hatlen > Priority: Minor > Attachments: derby-2472_initial_patch.diff, embedsqlexception.diff, embedsqlexception.stat, initCause.diff, initCause.stat, seenext.diff, seenext.stat, setStackTrace-v2.diff, setStackTrace.diff, standardexception.diff, standardexception.stat > > > As Derby has moved to J2SE 1.4, Throwable.initCause() can now be used to improve error reporting. > As stated in the initial commit (that was backed out, see below): > 'Set Throwable.initCause() in a couple of locations at the JDBC level where we setup nested SQLExceptions. > This means that automatically the stack trace for a database failed to start includes the reason > for the failure, rather than just "see next exception". This is a great help when running > JUnit tests and getting failures to start a database.' > The initial commit was backed out because it broke numerous tests under JDK 1.6, and the author indicated he had no time to investigate. > The patch caused no failures when running the tests with Java SE 5.0. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.