geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r651897 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/gbean/GBeanData.java
Date Sun, 27 Apr 2008 08:12:56 GMT
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) {



Mime
View raw message