Return-Path: Delivered-To: apmail-portals-pluto-scm-archive@www.apache.org Received: (qmail 84173 invoked from network); 3 Jan 2008 19:09:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 3 Jan 2008 19:09:05 -0000 Received: (qmail 71119 invoked by uid 500); 3 Jan 2008 19:08:54 -0000 Delivered-To: apmail-portals-pluto-scm-archive@portals.apache.org Received: (qmail 71086 invoked by uid 500); 3 Jan 2008 19:08:54 -0000 Mailing-List: contact pluto-scm-help@portals.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list pluto-scm@portals.apache.org Received: (qmail 71069 invoked by uid 99); 3 Jan 2008 19:08:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 11:08:54 -0800 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.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jan 2008 19:08:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6881B1A9832; Thu, 3 Jan 2008 11:08:42 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r608596 - /portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java Date: Thu, 03 Jan 2008 19:08:41 -0000 To: pluto-scm@portals.apache.org From: cdoremus@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080103190842.6881B1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cdoremus Date: Thu Jan 3 11:08:35 2008 New Revision: 608596 URL: http://svn.apache.org/viewvc?rev=608596&view=rev Log: Applied changes from PLUTO-458. Thanks Elliot. Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java?rev=608596&r1=608595&r2=608596&view=diff ============================================================================== --- portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java (original) +++ portals/pluto/branches/1.1-286-trunk-merge/pluto-descriptor-impl/src/main/java/org/apache/pluto/descriptors/services/castor/AbstractCastorDescriptorService.java Thu Jan 3 11:08:35 2008 @@ -103,9 +103,15 @@ object = unmarshaller.unmarshal(in); } } - catch(Exception me) { - me.printStackTrace(); - throw new IOException(me.getMessage()); + catch (IOException e) { + LOG.error(e.getMessage(), e); + throw e; + } + catch (Exception e) { + LOG.error(e.getMessage(), e); + IOException ioe = new IOException(e.getMessage()); + ioe.initCause(e); + throw ioe; } finally { if(is != null) { @@ -152,10 +158,14 @@ castorConfig.getProperties().setProperty("org.exolab.castor.indent", "true"); setCastorMarshallerOptions(marshaller, object); marshaller.marshal(object); - } catch(IOException io) { - throw io; + } catch(IOException e) { + LOG.error(e.getMessage(), e); + throw e; } catch (Exception e) { - throw new IOException(e.getMessage()); + LOG.error(e.getMessage(), e); + IOException ioe = new IOException(e.getMessage()); + ioe.initCause(e); + throw ioe; } finally { writer.flush();