peiyongz 2003/03/09 09:01:39 Modified: c/src/xercesc/util/Platforms/Win32 Win32PlatformUtils.cpp Log: PanicHandler Revision Changes Path 1.15 +5 -31 xml-xerces/c/src/xercesc/util/Platforms/Win32/Win32PlatformUtils.cpp Index: Win32PlatformUtils.cpp =================================================================== RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Platforms/Win32/Win32PlatformUtils.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- Win32PlatformUtils.cpp 17 Feb 2003 20:31:23 -0000 1.14 +++ Win32PlatformUtils.cpp 9 Mar 2003 17:01:38 -0000 1.15 @@ -68,6 +68,8 @@ #include <xercesc/util/XMLString.hpp> #include <xercesc/util/XMLUniDefs.hpp> #include <xercesc/util/XMLUni.hpp> +#include <xercesc/util/PanicHandler.hpp> + #include <windows.h> #include <stdio.h> #include <stdlib.h> @@ -136,37 +138,9 @@ // --------------------------------------------------------------------------- // XMLPlatformUtils: The panic method // --------------------------------------------------------------------------- -void XMLPlatformUtils::panic(const PanicReasons reason) +void XMLPlatformUtils::panic(const PanicHandler::PanicReasons reason) { - const char* reasonStr = "Unknown reason"; - switch (reason) - { - case Panic_NoTransService: - reasonStr = "Could not load a transcoding service"; - break; - case Panic_NoDefTranscoder: - reasonStr = "Could not load a local code page transcoder"; - break; - case Panic_CantFindLib: - reasonStr = "Could not find the xerces-c DLL"; - break; - case Panic_UnknownMsgDomain: - reasonStr = "Unknown message domain"; - break; - case Panic_CantLoadMsgDomain: - reasonStr = "Cannot load message domain"; - break; - case Panic_SynchronizationErr: - reasonStr = "Cannot synchronize system or mutex"; - break; - case Panic_SystemInit: - reasonStr = "Cannot initialize the system or mutex"; - break; - } - - fprintf(stderr, "Xerces Panic Error: %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]