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 16:02:21 UTC

svn commit: r225516 - /xerces/c/trunk/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp

Author: cargilld
Date: Wed Jul 27 07:02:19 2005
New Revision: 225516

URL: http://svn.apache.org/viewcvs?rev=225516&view=rev
Log:
Update loadAMsgSet routines to have consisent behaviour.

Modified:
    xerces/c/trunk/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp

Modified: xerces/c/trunk/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp?rev=225516&r1=225515&r2=225516&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/Platforms/MacOS/MacOSPlatformUtils.cpp Wed Jul 27 07:02:19 2005
@@ -57,6 +57,7 @@
 #include <xercesc/util/Platforms/MacOS/MacCarbonFile.hpp>
 #include <xercesc/util/Platforms/MacOS/MacPosixFile.hpp>
 #include <xercesc/util/PanicHandler.hpp>
+#include <xercesc/util/OutOfMemoryException.hpp>
 
 #if (defined(XML_USE_INMEMORY_MSGLOADER) || defined(XML_USE_INMEM_MESSAGELOADER))
    #include <xercesc/util/MsgLoaders/InMemory/InMemMsgLoader.hpp>
@@ -608,12 +609,25 @@
 XMLMsgLoader*
 XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain)
 {
+    XMLMsgLoader* retVal;
+    try
+    {
 #if (defined(XML_USE_INMEMORY_MSGLOADER) || defined(XML_USE_INMEM_MESSAGELOADER))
-    return new (fgMemoryManager) InMemMsgLoader(msgDomain);
+        retVal = new (fgMemoryManager) InMemMsgLoader(msgDomain);
 #else
-    #error You must provide a message loader
-    return 0;
+        #error You must provide a message loader
+        return 0;
 #endif
+    }
+    catch(const OutOfMemoryException&)
+    {
+        throw;
+    }
+    catch(...)
+    {
+         panic(PanicHandler::Panic_CantLoadMsgDomain);
+    }
+    return retVal;
 }
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org