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/05/20 18:21:03 UTC
cvs commit: xml-xerces/c/doc program.xml program-others.xml
peiyongz 2003/05/20 09:21:02
Modified: c/doc program.xml program-others.xml
Log:
Pluggable Panic Handler
Revision Changes Path
1.36 +3 -1 xml-xerces/c/doc/program.xml
Index: program.xml
===================================================================
RCS file: /home/cvs/xml-xerces/c/doc/program.xml,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- program.xml 24 Jan 2003 19:59:56 -0000 1.35
+++ program.xml 20 May 2003 16:21:02 -0000 1.36
@@ -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>
1.16 +39 -2 xml-xerces/c/doc/program-others.xml
Index: program-others.xml
===================================================================
RCS file: /home/cvs/xml-xerces/c/doc/program-others.xml,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- program-others.xml 25 Mar 2003 18:34:53 -0000 1.15
+++ program-others.xml 20 May 2003 16:21:02 -0000 1.16
@@ -511,7 +511,7 @@
<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 @@
<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>
@@ -559,6 +559,43 @@
try
{
XMLPlatformUtils::Initialize("en_US", "/usr/application_root/msg_home");
+ }
+
+ catch ()
+ {
+ }
+..
+</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 ()
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org