[cpp-xmltooling COMMIT] /branches/REL_1/xmltooling/util/XMLHelper.cpp

noreply at shibboleth.net noreply at shibboleth.net
Thu Feb 12 14:29:45 EST 2015


Author: scantor
Date: Thu Feb 12 14:29:44 2015
New Revision: 1048

URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=1048&view=rev
Log:
Guard marshalling with exception handler.

Modified:
    branches/REL_1/xmltooling/util/XMLHelper.cpp

Modified: branches/REL_1/xmltooling/util/XMLHelper.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/util/XMLHelper.cpp?rev=1048&r1=1047&r2=1048&view=diff
==============================================================================
--- branches/REL_1/xmltooling/util/XMLHelper.cpp (original)
+++ branches/REL_1/xmltooling/util/XMLHelper.cpp Thu Feb 12 14:29:44 2015
@@ -452,5 +452,11 @@
 
 ostream& xmltooling::operator<<(ostream& ostr, const XMLObject& obj)
 {
-    return ostr << *(obj.marshall());
-}
+    try {
+        return ostr << *(obj.marshall());
+    }
+    catch (DOMException& ex) {
+        auto_ptr_char msg(ex.getMessage());
+        throw XMLParserException(msg.get());
+    }
+}



More information about the commits mailing list