cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1182754 - in /cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source: Messages.properties NodeDataReader.java NodeDataWriter.java XMLStreamDataReader.java XMLStreamDataWriter.java
Date Thu, 13 Oct 2011 10:08:20 GMT
Author: ningjiang
Date: Thu Oct 13 10:08:19 2011
New Revision: 1182754

URL: http://svn.apache.org/viewvc?rev=1182754&view=rev
Log:
CXF-3858 Added the cause exception class name into the fault message

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties?rev=1182754&r1=1182753&r2=1182754&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/Messages.properties
Thu Oct 13 10:08:19 2011
@@ -20,5 +20,5 @@
 #
 COULD_NOT_READ_XML_STREAM = Could not parse the XML stream.
 COULD_NOT_WRITE_XML_STREAM = Could not generate the XML stream.
-COULD_NOT_REDA_XML_STREAM_CAUSED_BY = Could not parse the XML stream caused by {0}.
-COULD_NOT_WRITE_XML_STREAM_CAUSED_BY = Could not generate the XML stream caused by {0}.
+COULD_NOT_REDA_XML_STREAM_CAUSED_BY = Could not parse the XML stream caused by: {0}: {1}.
+COULD_NOT_WRITE_XML_STREAM_CAUSED_BY = Could not generate the XML stream caused by: {0}:
{1}.

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java?rev=1182754&r1=1182753&r2=1182754&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataReader.java
Thu Oct 13 10:08:19 2011
@@ -66,7 +66,8 @@ public class NodeDataReader implements D
             } catch (IOException e) {
                 throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e);
             } catch (TransformerException e) {
-                throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
+                throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e,
+                                e.getClass().getCanonicalName(), e.getMessage());
             } 
         }  
         return read(input);

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java?rev=1182754&r1=1182753&r2=1182754&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/NodeDataWriter.java
Thu Oct 13 10:08:19 2011
@@ -56,7 +56,8 @@ public class NodeDataWriter implements D
             XMLStreamWriter writer = new W3CDOMStreamWriter((Element)n);
             StaxUtils.copy(s, writer);
         } catch (XMLStreamException e) {
-            throw new Fault("COULD_NOT_WRITE_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
+            throw new Fault("COULD_NOT_WRITE_XML_STREAM_CAUSED_BY", LOG, e,
+                            e.getClass().getCanonicalName(), e.getMessage());
         }
     }
 

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java?rev=1182754&r1=1182753&r2=1182754&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataReader.java
Thu Oct 13 10:08:19 2011
@@ -139,9 +139,11 @@ public class XMLStreamDataReader impleme
         } catch (IOException e) {
             throw new Fault("COULD_NOT_READ_XML_STREAM", LOG, e);
         } catch (XMLStreamException e) {
-            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
+            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e,
+                            e.getClass().getCanonicalName(), e.getMessage());
         } catch (SAXException e) {
-            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
+            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e,
+                            e.getClass().getCanonicalName(), e.getMessage());
         }
     }
     
@@ -225,7 +227,8 @@ public class XMLStreamDataReader impleme
                 return new DOMSource(document);
             }
         } catch (XMLStreamException e) {
-            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
+            throw new Fault("COULD_NOT_REDA_XML_STREAM_CAUSED_BY", LOG, e,
+                            e.getClass().getCanonicalName(), e.getMessage());
         }
     }
     

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java?rev=1182754&r1=1182753&r2=1182754&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/databinding/source/XMLStreamDataWriter.java
Thu Oct 13 10:08:19 2011
@@ -88,7 +88,8 @@ public class XMLStreamDataWriter impleme
                 StaxUtils.copy(s, writer);
             }
         } catch (XMLStreamException e) {
-            throw new Fault("COULD_NOT_WRITE_XML_STREAM_CAUSED_BY", LOG, e, e.getMessage());
+            throw new Fault("COULD_NOT_WRITE_XML_STREAM_CAUSED_BY", LOG, e,
+                            e.getClass().getCanonicalName(), e.getMessage());
         } catch (IOException e) {
             throw new Fault(new Message("COULD_NOT_WRITE_XML_STREAM", LOG), e);
         }



Mime
View raw message