peiyongz    2003/03/09 08:52:56

  Modified:    c/src/xercesc/util/Platforms/BeOS BeOSPlatformUtils.cpp
  Log:
  PanicHandler
  
  Revision  Changes    Path
  1.3       +7 -21     
xml-xerces/c/src/xercesc/util/Platforms/BeOS/BeOSPlatformUtils.cpp
  
  Index: BeOSPlatformUtils.cpp
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/c/src/xercesc/util/Platforms/BeOS/BeOSPlatformUtils.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- BeOSPlatformUtils.cpp     5 Feb 2003 18:28:39 -0000       1.2
  +++ BeOSPlatformUtils.cpp     9 Mar 2003 16:52:56 -0000       1.3
  @@ -56,6 +56,9 @@
   
   /*
    * $Log$
  + * Revision 1.3  2003/03/09 16:52:56  peiyongz
  + * PanicHandler
  + *
    * Revision 1.2  2003/02/05 18:28:39  tng
    * [Bug 13437] Incorrect memory management in XXXPlatformUtils.cpp.
    *
  @@ -99,6 +102,7 @@
   #include    <xercesc/util/XMLString.hpp>
   #include    <xercesc/util/XMLUniDefs.hpp>
   #include    <xercesc/util/XMLUni.hpp>
  +#include    <xercesc/util/PanicHandler.hpp>
   
   #include <Path.h>
   char *realpath(const char *path, char *resolved_path) {
  @@ -170,7 +174,7 @@
   
       catch(...)
       {
  -        panic(XMLPlatformUtils::Panic_CantLoadMsgDomain);
  +        panic(PanicHandler::Panic_CantLoadMsgDomain);
       }
       return retVal;
   }
  @@ -202,27 +206,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]

Reply via email to