portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cdore...@apache.org
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 GMT
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();



Mime
View raw message