diff --git a/doc/program-others.xml b/doc/program-others.xml index da1e2b64f079dd0688569ce1a7ed01623f20f47e..017ffa59ac05d2e37ee0fcdc0f6059d42155b8e4 100644 --- a/doc/program-others.xml +++ b/doc/program-others.xml @@ -511,7 +511,7 @@ new XERCES_CPP_NAMESPACE_QUALIFIER SAXParser(); <anchor name="SpecifyLocaleForMessageLoader"/> - <s2 title="Specify locale for message loader"> + <s2 title="Specify Locale for Message Loader"> <p>The &XercesCName; has implemented mechanism to support NLS, though the current drop has only English version message file, it is capable @@ -541,7 +541,7 @@ new XERCES_CPP_NAMESPACE_QUALIFIER SAXParser(); <anchor name="SpecifyLocationForMessageLoader"/> - <s2 title="Specify location for message loader"> + <s2 title="Specify Location for Message Loader"> <p>The &XercesCName; searches for message files at the default message directory, $XERCESCROOT/msg. </p> @@ -565,6 +565,43 @@ new XERCES_CPP_NAMESPACE_QUALIFIER SAXParser(); { } .. +</source> + + <anchor name="PluggablePanicHandler"/> + <s2 title="Pluggable Panic Handler"> + + <p>The &XercesCName; reports, through the method panic(), any panic encountered, + to the panic handler installed, which in turn takes whatever action appropriate, + to handle the panic. + </p> + <p>The &XercesCName; allows application plugging a customized panic handler + (class implementing the interface PanicHandler), in its very first invocation to + XMLPlatformUtils::Initialize() by supplying a parameter for the panic handler + intended. + </p> + <p>In the absence of such a plugged panic handler, &XercesCName; default + panic handler is installed and used, which aborts program whenever a panic + is seen. + </p> + </s2> + +<source> + +... + // Initialize the parser system + try + { + PanicHandler* ph = new MyPanicHandler(); + + XMLPlatformUtils::Initialize("en_US" + , "/usr/application_root/msg_home" + , ph); + } + + catch () + { + } +.. </source> <anchor name="UseSpecificScanner"/> diff --git a/doc/program.xml b/doc/program.xml index 386c93391a35309bf4695dfd544f46f50ffccab8..f34a523c0cfcdd8880cd8c7f95c1d4de75943d53 100644 --- a/doc/program.xml +++ b/doc/program.xml @@ -81,8 +81,10 @@ <li><jump href="program-others.html#PluggableTranscoders">Pluggable Transcoders</jump></li> <li><jump href="program-others.html#PortingGuidelines">Porting Guidelines</jump></li> <li><jump href="program-others.html#CPPNamespace">Using C++ Namespace</jump></li> - <li><jump href="program-others.html#SpecifylocaleforMessageLoader">Specify locale for Message Loader</jump></li> + <li><jump href="program-others.html#SpecifylocaleforMessageLoader">Specify Locale for Message Loader</jump></li> + <li><jump href="program-others.html#SpecifylocationforMessageLoader">Specify Location for Message Loader</jump></li> <li><jump href="program-others.html#UseSpecificScanner">Use Specific Scanner</jump></li> + <li><jump href="program-others.html#PluggablePanicHandler">Pluggable Panic Handler</jump></li> </ul> </s2>