Skip to content
Snippets Groups Projects
Commit 24747bdd authored by Gareth Reakes's avatar Gareth Reakes
Browse files

Fix to NetBSD to use PanicHandler. Patch by Hiramatsu Yoshifumi.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@174959 13f79535-47bb-0310-9956-ffa450edef68
parent 7fe459e0
No related branches found
No related tags found
No related merge requests found
...@@ -88,6 +88,7 @@ ...@@ -88,6 +88,7 @@
#include <xercesc/util/XMLString.hpp> #include <xercesc/util/XMLString.hpp>
#include <xercesc/util/XMLUniDefs.hpp> #include <xercesc/util/XMLUniDefs.hpp>
#include <xercesc/util/XMLUni.hpp> #include <xercesc/util/XMLUni.hpp>
#include <xercesc/util/PanicHandler.hpp>
#if defined(XML_USE_ICU_TRANSCODER) #if defined(XML_USE_ICU_TRANSCODER)
#include <xercesc/util/Transcoders/ICU/ICUTransService.hpp> #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp>
...@@ -288,7 +289,7 @@ XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain) ...@@ -288,7 +289,7 @@ XMLMsgLoader* XMLPlatformUtils::loadAMsgSet(const XMLCh* const msgDomain)
catch(...) catch(...)
{ {
panic(XMLPlatformUtils::Panic_CantLoadMsgDomain); panic(PanicHandler::Panic_CantLoadMsgDomain);
} }
return retVal; return retVal;
} }
...@@ -318,27 +319,9 @@ XMLTransService* XMLPlatformUtils::makeTransService() ...@@ -318,27 +319,9 @@ XMLTransService* XMLPlatformUtils::makeTransService()
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// XMLPlatformUtils: The panic method // XMLPlatformUtils: The panic method
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
void XMLPlatformUtils::panic(const PanicReasons reason) void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason)
{ {
const char* reasonStr = "Unknown reason"; fgUserPanicHandler? fgUserPanicHandler->panic(reason) : fgDefaultPanicHandler->panic(reason);
if (reason == Panic_NoTransService)
reasonStr = "Could not load a transcoding service";
else if (reason == Panic_NoDefTranscoder)
reasonStr = "Could not load a local code page transcoder";
else if (reason == Panic_CantFindLib)
reasonStr = "Could not find the xerces-c DLL";
else if (reason == Panic_UnknownMsgDomain)
reasonStr = "Unknown message domain";
else if (reason == Panic_CantLoadMsgDomain)
reasonStr = "Cannot load message domain";
else if (reason == Panic_SynchronizationErr)
reasonStr = "Cannot synchronize system or mutex";
else if (reason == Panic_SystemInit)
reasonStr = "Cannot initialize the system or mutex";
fprintf(stderr, "%s\n", reasonStr);
exit(-1);
} }
......
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