Return-Path: Delivered-To: apmail-incubator-open-jpa-commits-archive@locus.apache.org Received: (qmail 11894 invoked from network); 24 Mar 2007 19:37:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Mar 2007 19:37:54 -0000 Received: (qmail 19216 invoked by uid 500); 24 Mar 2007 19:38:01 -0000 Delivered-To: apmail-incubator-open-jpa-commits-archive@incubator.apache.org Received: (qmail 19201 invoked by uid 500); 24 Mar 2007 19:38:01 -0000 Mailing-List: contact open-jpa-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: open-jpa-dev@incubator.apache.org Delivered-To: mailing list open-jpa-commits@incubator.apache.org Received: (qmail 19188 invoked by uid 99); 24 Mar 2007 19:38:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2007 12:38:01 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 24 Mar 2007 12:37:53 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id E2F071A9838; Sat, 24 Mar 2007 12:37:32 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r522097 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java Date: Sat, 24 Mar 2007 19:37:32 -0000 To: open-jpa-commits@incubator.apache.org From: mprudhom@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070324193732.E2F071A9838@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mprudhom Date: Sat Mar 24 12:37:32 2007 New Revision: 522097 URL: http://svn.apache.org/viewvc?view=rev&rev=522097 Log: OPENJPA-176 Made the stringified exception prefixes scrutable. Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java Modified: incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java URL: http://svn.apache.org/viewvc/incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java?view=diff&rev=522097&r1=522096&r2=522097 ============================================================================== --- incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java (original) +++ incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/util/Exceptions.java Sat Mar 24 12:37:32 2007 @@ -132,10 +132,17 @@ * Stringify the given exception. */ public static String toString(ExceptionInfo e) { + int type = e.getType(); StringBuffer buf = new StringBuffer(); - buf.append("<").append(e.getType()). - append('|').append(e.isFatal()). - append('|').append(OpenJPAVersion.VERSION_NUMBER). + buf.append("<"). + append(OpenJPAVersion.VERSION_NUMBER).append(' '). + append(e.isFatal() ? "fatal " : "nonfatal "). + append (type == ExceptionInfo.GENERAL ? "general error" : + type == ExceptionInfo.INTERNAL ? "internal error" : + type == ExceptionInfo.STORE ? "store error" : + type == ExceptionInfo.UNSUPPORTED ? "unsupported error" : + type == ExceptionInfo.USER ? "user error" : + (type + " error")). append("> "); buf.append(e.getClass().getName()).append(": "). append(e.getMessage());