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/07/27 15:59:45 UTC
svn commit: r225512 -
/xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp
Author: cargilld
Date: Wed Jul 27 06:59:44 2005
New Revision: 225512
URL: http://svn.apache.org/viewcvs?rev=225512&view=rev
Log:
Update loadAMsgSet routines to have consisent behaviour.
Modified:
xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp
Modified: xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp?rev=225512&r1=225511&r2=225512&view=diff
==============================================================================
--- xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp (original)
+++ xerces/c/branches/xerces-2.7/src/xercesc/util/Platforms/OS2/OS2PlatformUtils.cpp Wed Jul 27 06:59:44 2005
@@ -36,6 +36,7 @@
#include <xercesc/util/XMLString.hpp>
#include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/util/PanicHandler.hpp>
+#include <xercesc/util/OutOfMemoryException.hpp>
#include <stdio.h>
#include <stdlib.h>
@@ -377,11 +378,25 @@
// -----------------------------------------------------------------------
XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain)
{
+ XMLMsgLoader* retVal;
+ try
+ {
#if defined(XML_USE_INMEMORY_MSGLOADER)
- return new (fgMemoryManager) InMemMsgLoader(msgDomain);
+ retVal = new (fgMemoryManager) InMemMsgLoader(msgDomain);
#else
- return 0;
+ #error You must provide a message loader
+ return 0;
#endif
+ }
+ catch(const OutOfMemoryException&)
+ {
+ throw;
+ }
+ catch(...)
+ {
+ panic(PanicHandler::Panic_CantLoadMsgDomain);
+ }
+ return retVal;
}
XMLNetAccessor* XMLPlatformUtils::makeNetAccessor()
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org