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 21:01:20 UTC
svn commit: r191705 - in
/xerces/c/branches/xerces-2.7/src/xercesc/framework: XMLAttDef.cpp
XMLAttr.cpp XMLEntityDecl.cpp
Author: cargilld
Date: Tue Jun 21 12:01:19 2005
New Revision: 191705
URL: http://svn.apache.org/viewcvs?rev=191705&view=rev
Log:
Add back changes Bertoni made that were overwritten.
Modified:
xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttDef.cpp
xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttr.cpp
xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLEntityDecl.cpp
Modified: xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttDef.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttDef.cpp?rev=191705&r1=191704&r2=191705&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttDef.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttDef.cpp Tue Jun 21 12:01:19 2005
@@ -130,6 +130,8 @@
{
}
+typedef JanitorMemFunCall<XMLAttDef> CleanupType;
+
XMLAttDef::XMLAttDef( const XMLCh* const attrValue
, const XMLAttDef::AttTypes type
, const XMLAttDef::DefAttTypes defType
@@ -146,6 +148,8 @@
, fEnumeration(0)
, fMemoryManager(manager)
{
+ CleanupType cleanup(this, &XMLAttDef::cleanUp);
+
try
{
fValue = XMLString::replicate(attrValue, fMemoryManager);
@@ -153,12 +157,12 @@
}
catch(const OutOfMemoryException&)
{
+ cleanup.release();
+
throw;
}
- catch(...)
- {
- cleanUp();
- }
+
+ cleanup.release();
}
Modified: xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttr.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttr.cpp?rev=191705&r1=191704&r2=191705&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttr.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLAttr.cpp Tue Jun 21 12:01:19 2005
@@ -45,6 +45,8 @@
fAttName = new (fMemoryManager) QName(fMemoryManager);
}
+typedef JanitorMemFunCall<XMLAttr> CleanupType;
+
XMLAttr::XMLAttr( const unsigned int uriId
, const XMLCh* const attrName
, const XMLCh* const attrPrefix
@@ -64,6 +66,8 @@
, fDatatypeValidator(datatypeValidator)
, fIsSchemaValidated(isSchema)
{
+ CleanupType cleanup(this, &XMLAttr::cleanUp);
+
try
{
//
@@ -75,12 +79,12 @@
}
catch(const OutOfMemoryException&)
{
+ cleanup.release();
+
throw;
}
- catch(...)
- {
- cleanUp();
- }
+
+ cleanup.release();
}
XMLAttr::XMLAttr( const unsigned int uriId
@@ -101,6 +105,8 @@
, fDatatypeValidator(datatypeValidator)
, fIsSchemaValidated(isSchema)
{
+ CleanupType cleanup(this, &XMLAttr::cleanUp);
+
try
{
// Just call the local setters to set up everything. Too much
@@ -110,12 +116,12 @@
}
catch(const OutOfMemoryException&)
{
+ cleanup.release();
+
throw;
}
- catch(...)
- {
- cleanUp();
- }
+
+ cleanup.release();
}
Modified: xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLEntityDecl.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLEntityDecl.cpp?rev=191705&r1=191704&r2=191705&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLEntityDecl.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/framework/XMLEntityDecl.cpp Tue Jun 21 12:01:19 2005
@@ -61,6 +61,8 @@
fName = XMLString::replicate(entName, fMemoryManager);
}
+typedef JanitorMemFunCall<XMLEntityDecl> CleanupType;
+
XMLEntityDecl::XMLEntityDecl(const XMLCh* const entName
, const XMLCh* const value
, MemoryManager* const manager) :
@@ -74,6 +76,8 @@
, fBaseURI(0)
, fMemoryManager(manager)
{
+ CleanupType cleanup(this, &XMLEntityDecl::cleanUp);
+
try
{
fValue = XMLString::replicate(value, fMemoryManager);
@@ -81,12 +85,12 @@
}
catch(const OutOfMemoryException&)
{
+ cleanup.release();
+
throw;
}
- catch(...)
- {
- cleanUp();
- }
+
+ cleanup.release();
}
XMLEntityDecl::XMLEntityDecl(const XMLCh* const entName
@@ -102,6 +106,8 @@
, fBaseURI(0)
, fMemoryManager(manager)
{
+ CleanupType cleanup(this, &XMLEntityDecl::cleanUp);
+
try
{
XMLCh dummy[2] = { chNull, chNull };
@@ -111,12 +117,12 @@
}
catch(const OutOfMemoryException&)
{
+ cleanup.release();
+
throw;
}
- catch(...)
- {
- cleanUp();
- }
+
+ cleanup.release();
}
XMLEntityDecl::~XMLEntityDecl()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org