You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ga...@apache.org on 2003/05/14 16:45:41 UTC

cvs commit: xml-xerces/c/src/xercesc/util/Platforms/NetBSD NetBSDPlatformUtils.cpp

gareth      2003/05/14 07:45:41

  Modified:    c/src/xercesc/util/Platforms/NetBSD NetBSDPlatformUtils.cpp
  Log:
  Fix to NetBSD to use PanicHandler. Patch by Hiramatsu Yoshifumi.
  
  Revision  Changes    Path
  1.2       +4 -21     xml-xerces/c/src/xercesc/util/Platforms/NetBSD/NetBSDPlatformUtils.cpp
  
  Index: NetBSDPlatformUtils.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Platforms/NetBSD/NetBSDPlatformUtils.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- NetBSDPlatformUtils.cpp	13 May 2003 13:24:07 -0000	1.1
  +++ NetBSDPlatformUtils.cpp	14 May 2003 14:45:41 -0000	1.2
  @@ -88,6 +88,7 @@
   #include    <xercesc/util/XMLString.hpp>
   #include    <xercesc/util/XMLUniDefs.hpp>
   #include    <xercesc/util/XMLUni.hpp>
  +#include    <xercesc/util/PanicHandler.hpp>
   
   #if defined(XML_USE_ICU_TRANSCODER)
       #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp>
  @@ -288,7 +289,7 @@
   
       catch(...)
       {
  -        panic(XMLPlatformUtils::Panic_CantLoadMsgDomain);
  +        panic(PanicHandler::Panic_CantLoadMsgDomain);
       }
       return retVal;
   }
  @@ -318,27 +319,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: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org