Skip to content
Snippets Groups Projects
Commit 9b408ee0 authored by David Abram Cargill's avatar David Abram Cargill
Browse files

Update loadAMsgSet routines to have consisent behaviour.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@225516 13f79535-47bb-0310-9956-ffa450edef68
parent 7bda82ac
No related branches found
No related tags found
No related merge requests found
...@@ -57,6 +57,7 @@ ...@@ -57,6 +57,7 @@
#include <xercesc/util/Platforms/MacOS/MacCarbonFile.hpp> #include <xercesc/util/Platforms/MacOS/MacCarbonFile.hpp>
#include <xercesc/util/Platforms/MacOS/MacPosixFile.hpp> #include <xercesc/util/Platforms/MacOS/MacPosixFile.hpp>
#include <xercesc/util/PanicHandler.hpp> #include <xercesc/util/PanicHandler.hpp>
#include <xercesc/util/OutOfMemoryException.hpp>
#if (defined(XML_USE_INMEMORY_MSGLOADER) || defined(XML_USE_INMEM_MESSAGELOADER)) #if (defined(XML_USE_INMEMORY_MSGLOADER) || defined(XML_USE_INMEM_MESSAGELOADER))
#include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp> #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>
...@@ -608,12 +609,25 @@ XMLPlatformUtils::makeNetAccessor() ...@@ -608,12 +609,25 @@ XMLPlatformUtils::makeNetAccessor()
XMLMsgLoader* XMLMsgLoader*
XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain) XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain)
{ {
XMLMsgLoader* retVal;
try
{
#if (defined(XML_USE_INMEMORY_MSGLOADER) || defined(XML_USE_INMEM_MESSAGELOADER)) #if (defined(XML_USE_INMEMORY_MSGLOADER) || defined(XML_USE_INMEM_MESSAGELOADER))
return new (fgMemoryManager) InMemMsgLoader(msgDomain); retVal = new (fgMemoryManager) InMemMsgLoader(msgDomain);
#else #else
#error You must provide a message loader #error You must provide a message loader
return 0; return 0;
#endif #endif
}
catch(const OutOfMemoryException&)
{
throw;
}
catch(...)
{
panic(PanicHandler::Panic_CantLoadMsgDomain);
}
return retVal;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment