You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2008/04/27 10:12:56 UTC

svn commit: r651897 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java

Author: jdillon
Date: Sun Apr 27 01:12:54 2008
New Revision: 651897

URL: http://svn.apache.org/viewvc?rev=651897&view=rev
Log:
Add some extra detail about the attribute type when we fail to serialize

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java?rev=651897&r1=651896&r2=651897&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java (original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java Sun Apr 27 01:12:54 2008
@@ -20,6 +20,7 @@
 import java.io.IOException;
 import java.io.ObjectInput;
 import java.io.ObjectOutput;
+import java.io.NotSerializableException;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashMap;
@@ -231,6 +232,9 @@
             try {
                 out.writeObject(name);
                 out.writeObject(value);
+            } catch (NotSerializableException e) {
+                // When we find something that is not serialzable, include the type information as well as the name/abstractName for debugging
+                throw (IOException) new IOException("Unable to write attribute: " + name + " in gbean: " + abstractName + " type: " + value.getClass()).initCause(e);
             } catch (IOException e) {
                 throw (IOException) new IOException("Unable to write attribute: " + name + " in gbean: " + abstractName).initCause(e);
             } catch (NoClassDefFoundError e) {