You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2005/06/21 17:15:59 UTC
svn commit: r191666 - in /xerces/c/branches/xerces-2.7/src/xercesc/framework:
LocalFileFormatTarget.cpp XMLNotationDecl.cpp
Author: cargilld
Date: Tue Jun 21 08:15:56 2005
New Revision: 191666
URL: http://svn.apache.org/viewcvs?rev=191666&view=rev
Log:
Add back changes Bertoni made that were overwritten.
Modified:
xerces/c/branches/xerces-2.7/src/xercesc/framework/LocalFileFormatTarget.cpp
xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLNotationDecl.cpp
Modified: xerces/c/branches/xerces-2.7/src/xercesc/framework/LocalFileFormatTarget.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/framework/LocalFileFormatTarget.cpp?rev=191666&r1=191665&r2=191666&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/framework/LocalFileFormatTarget.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/framework/LocalFileFormatTarget.cpp Tue Jun 21 08:15:56 2005
@@ -22,6 +22,7 @@
#include <xercesc/framework/MemoryManager.hpp>
#include <xercesc/util/IOException.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
+#include <assert.h>
#include <string.h>
XERCES_CPP_NAMESPACE_BEGIN
@@ -150,10 +151,8 @@
{
return false;
}
- catch (...)
- {
- return false;
- }
+
+ assert(newBuf);
// Copy over the old stuff
memcpy(newBuf, fDataBuf, fCapacity * sizeof(XMLByte) + 4);
Modified: xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLNotationDecl.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLNotationDecl.cpp?rev=191666&r1=191665&r2=191666&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLNotationDecl.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLNotationDecl.cpp Tue Jun 21 08:15:56 2005
@@ -42,6 +42,8 @@
{
}
+typedef JanitorMemFunCall<XMLNotationDecl> CleanupType;
+
XMLNotationDecl::XMLNotationDecl( const XMLCh* const notName
, const XMLCh* const pubId
, const XMLCh* const sysId
@@ -55,6 +57,8 @@
, fBaseURI(0)
, fMemoryManager(manager)
{
+ CleanupType cleanup(this, &XMLNotationDecl::cleanUp);
+
try
{
fName = XMLString::replicate(notName, fMemoryManager);
@@ -64,12 +68,12 @@
}
catch(const OutOfMemoryException&)
{
+ cleanup.release();
+
throw;
}
- catch(...)
- {
- cleanUp();
- }
+
+ cleanup.release();
}
XMLNotationDecl::~XMLNotationDecl()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org