You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2003/03/09 17:52:13 UTC

cvs commit: xml-xerces/c/src/xercesc/util/Platforms/AIX AIXPlatformUtils.cpp

peiyongz    2003/03/09 08:52:13

  Modified:    c/src/xercesc/util/Platforms/AIX AIXPlatformUtils.cpp
  Log:
  PanicHandler
  
  Revision  Changes    Path
  1.11      +5 -22     xml-xerces/c/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp
  
  Index: AIXPlatformUtils.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/Platforms/AIX/AIXPlatformUtils.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- AIXPlatformUtils.cpp	5 Feb 2003 18:28:30 -0000	1.10
  +++ AIXPlatformUtils.cpp	9 Mar 2003 16:52:13 -0000	1.11
  @@ -86,6 +86,7 @@
   #include    <xercesc/util/Janitor.hpp>
   #include    <xercesc/util/XMLString.hpp>
   #include    <xercesc/util/XMLUniDefs.hpp>
  +#include    <xercesc/util/PanicHandler.hpp>
   
   #if defined (XML_USE_ICU_TRANSCODER)
       #include <xercesc/util/Transcoders/ICU/ICUTransService.hpp>
  @@ -163,7 +164,7 @@
   
       catch(...)
       {
  -         panic(XMLPlatformUtils::Panic_CantLoadMsgDomain);
  +         panic(PanicHandler::Panic_CantLoadMsgDomain);
       }
       return retVal;
   }
  @@ -171,27 +172,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