peiyongz 2003/03/09 08:58:31 Modified: c/src/xercesc/util/Platforms/OS390 OS390PlatformUtils.cpp Log: PanicHandler Revision Changes Path 1.8 +7 -24 xml-xerces/c/src/xercesc/util/Platforms/OS390/OS390PlatformUtils.cpp Index: OS390PlatformUtils.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Platforms/OS390/OS390PlatformUtils.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- OS390PlatformUtils.cpp 6 Feb 2003 14:44:14 -0000 1.7 +++ OS390PlatformUtils.cpp 9 Mar 2003 16:58:31 -0000 1.8 @@ -88,6 +88,7 @@ #include <xercesc/util/XMLString.hpp> #include <xercesc/util/XMLUniDefs.hpp> #include <xercesc/util/XMLUni.hpp> +#include <xercesc/util/PanicHandler.hpp> #include "Path390.hpp" #include "FileHandleImpl.hpp" @@ -136,7 +137,7 @@ } catch (...) { - panic(XMLPlatformUtils::Panic_SystemInit); + panic(PanicHandler::Panic_SystemInit); } #endif @@ -158,7 +159,7 @@ } catch (...) { - panic(XMLPlatformUtils::Panic_SystemInit); + panic(PanicHandler::Panic_SystemInit); } } @@ -197,7 +198,7 @@ catch(...) { - panic(XMLPlatformUtils::Panic_CantLoadMsgDomain); + panic(PanicHandler::Panic_CantLoadMsgDomain); } return retVal; } @@ -229,27 +230,9 @@ // --------------------------------------------------------------------------- // XMLPlatformUtils: The panic method // --------------------------------------------------------------------------- -void XMLPlatformUtils::panic(const PanicReasons reason) +void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason) { - const char* reasonStr = "Unknown 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); + fgUserPanicHandler? fgUserPanicHandler->panic(reason) : fgDefaultPanicHandler->panic(reason); }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]