geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r413471 - /geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java
Date Sun, 11 Jun 2006 16:15:37 GMT
Author: djencks
Date: Sun Jun 11 09:15:36 2006
New Revision: 413471

URL: http://svn.apache.org/viewvc?rev=413471&view=rev
Log:
Improve self-documentation of gbean serialization errors (i.e. improve error messages)

Modified:
    geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java

Modified: geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java
URL: http://svn.apache.org/viewvc/geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java?rev=413471&r1=413470&r2=413471&view=diff
==============================================================================
--- geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java (original)
+++ geronimo/trunk/modules/kernel/src/java/org/apache/geronimo/gbean/GBeanData.java Sun Jun
11 09:15:36 2006
@@ -186,7 +186,9 @@
                 out.writeObject(name);
                 out.writeObject(value);
             } catch (IOException e) {
-                throw (IOException) new IOException("Unable to write attribute: " + name).initCause(e);
+                throw (IOException) new IOException("Unable to write attribute: " + name
+ " in gbean: " + abstractName).initCause(e);
+            } catch (NoClassDefFoundError e) {
+                throw (IOException) new IOException("Unable to write attribute: " + name
+ " in gbean: " + abstractName).initCause(e);
             }
         }
 
@@ -200,14 +202,18 @@
                 out.writeObject(name);
                 out.writeObject(value);
             } catch (IOException e) {
-                throw (IOException) new IOException("Unable to write reference pattern: "
+ name).initCause(e);
+                throw (IOException) new IOException("Unable to write reference pattern: "
+ name + " in gbean: " + abstractName).initCause(e);
             }
         }
         //write the dependencies
         out.writeInt(dependencies.size());
         for (Iterator iterator = dependencies.iterator(); iterator.hasNext();) {
             ReferencePatterns referencePatterns = (ReferencePatterns) iterator.next();
-            out.writeObject(referencePatterns);
+            try {
+                out.writeObject(referencePatterns);
+            } catch (IOException e) {
+                throw (IOException) new IOException("Unable to write dependency pattern in
gbean: " + abstractName).initCause(e);
+            }
         }
 
     }
@@ -230,7 +236,7 @@
             int attributeCount = in.readInt();
             for (int i = 0; i < attributeCount; i++) {
                 String attributeName = (String) in.readObject();
-                Object attributeValue = null;
+                Object attributeValue;
                 try {
                     attributeValue = in.readObject();
                 } catch (ClassNotFoundException e) {



Mime
View raw message