Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > ee493823148ed6fb895c827f4e36eb1c > files > 851

xerces-c-doc-2.7.0-7mdv2008.1.x86_64.rpm

<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>Xerces-C++: XMLException.hpp Source File</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR>
  <A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

     <A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
     <A href="../charter.html" onMouseOut="rolloverOff('side-charter');" onMouseOver="rolloverOn('side-charter');"><IMG alt="Charter" border="0" height="12" hspace="0" name="side-charter" onLoad="rolloverLoad('side-charter','../graphics/charter-label-2.jpg','../graphics/charter-label-3.jpg');" src="../graphics/charter-label-3.jpg" vspace="0" width="120"></A><BR>
     <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
     
     




  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

     <A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
     <A href="http://xml.apache.org/xerces-c/download.cgi" onMouseOut="rolloverOff('side-ext-20');" onMouseOver="rolloverOn('side-ext-20');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-20" onLoad="rolloverLoad('side-ext-20','../graphics/ext-20-label-2.jpg','../graphics/ext-20-label-3.jpg');" src="../graphics/ext-20-label-3.jpg" vspace="0" width="120"></A><BR>
     <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build Instructions" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR>
     
     
     

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

     <A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR>

     <A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
     
     
     
     
     
     
     
     
     
     
     
     
     
     
     

     <A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

     <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-70');" onMouseOver="rolloverOn('side-ext-70');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-70" onLoad="rolloverLoad('side-ext-70','../graphics/ext-70-label-2.jpg','../graphics/ext-70-label-3.jpg');" src="../graphics/ext-70-label-3.jpg" vspace="0" width="120"></A><BR>

     <IMG alt="Programming" border="0" height="12" hspace="0" src="../graphics/program-label-1.jpg" vspace="0" width="120"><BR>
     
     
     
     
     
     
     

     <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR>
     
     
  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

  <A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR>
  <A href="../pdf.html" onMouseOut="rolloverOff('side-pdf');" onMouseOver="rolloverOn('side-pdf');"><IMG alt="PDF Document" border="0" height="12" hspace="0" name="side-pdf" onLoad="rolloverLoad('side-pdf','../graphics/pdf-label-2.jpg','../graphics/pdf-label-3.jpg');" src="../graphics/pdf-label-3.jpg" vspace="0" width="120"></A><BR>

  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>

   
<A href="http://svn.apache.org/viewcvs.cgi/xerces/?root=Apache-SVN" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Source Repository" border="0" height="12" hspace="0" name="side-ext-102" onLoad="rolloverLoad('side-ext-102','../graphics/ext-102-label-2.jpg','../graphics/ext-102-label-3.jpg');" src="../graphics/ext-102-label-3.jpg" vspace="0" width="120"></A><BR>

   
<A href="http://marc.theaimsgroup.com/?l=xerces-c-users" onMouseOut="rolloverOff('side-ext-104');" onMouseOver="rolloverOn('side-ext-104');"><IMG alt="User Mail Archive" border="0" height="12" hspace="0" name="side-ext-104" onLoad="rolloverLoad('side-ext-104','../graphics/ext-104-label-2.jpg','../graphics/ext-104-label-3.jpg');" src="../graphics/ext-104-label-3.jpg" vspace="0" width="120"></A><BR>

   
<A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-106');" onMouseOver="rolloverOn('side-ext-106');"><IMG alt="Devel Mail Archive" border="0" height="12" hspace="0" name="side-ext-106" onLoad="rolloverLoad('side-ext-106','../graphics/ext-106-label-2.jpg','../graphics/ext-106-label-3.jpg');" src="../graphics/ext-106-label-3.jpg" vspace="0" width="120"></A><BR>




<IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD>
    <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">

	    <P>
<!-- Generated by Doxygen 1.4.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">src</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">xercesc</a>&nbsp;/&nbsp;<a class="el" href="dir_000003.html">util</a></div>
<h1>XMLException.hpp</h1><a href="XMLException_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*</span>
00002 <span class="comment"> * Copyright 1999-2000,2004 The Apache Software Foundation.</span>
00003 <span class="comment"> * </span>
00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span>
00005 <span class="comment"> * you may not use this file except in compliance with the License.</span>
00006 <span class="comment"> * You may obtain a copy of the License at</span>
00007 <span class="comment"> * </span>
00008 <span class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</span>
00009 <span class="comment"> * </span>
00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span>
00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span>
00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span>
00013 <span class="comment"> * See the License for the specific language governing permissions and</span>
00014 <span class="comment"> * limitations under the License.</span>
00015 <span class="comment"> */</span>
00016 
00017 <span class="comment">/*</span>
00018 <span class="comment"> * $Id: XMLException.hpp 176026 2004-09-08 13:57:07Z peiyongz $</span>
00019 <span class="comment"> */</span>
00020 
00021 <span class="preprocessor">#if !defined(EXCEPTION_HPP)</span>
<a name="l00022"></a><a class="code" href="XMLException_8hpp.html#a0">00022</a> <span class="preprocessor"></span><span class="preprocessor">#define EXCEPTION_HPP</span>
00023 <span class="preprocessor"></span>
00024 <span class="preprocessor">#include &lt;<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>&gt;</span>
00025 <span class="preprocessor">#include &lt;xercesc/util/XMLExceptMsgs.hpp&gt;</span>
00026 <span class="preprocessor">#include &lt;<a class="code" href="XMLUni_8hpp.html">xercesc/util/XMLUni.hpp</a>&gt;</span>
00027 <span class="preprocessor">#include &lt;<a class="code" href="XMLErrorReporter_8hpp.html">xercesc/framework/XMLErrorReporter.hpp</a>&gt;</span>
00028 
00029 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_BEGIN</a>
00030 
00031 <span class="comment">// ---------------------------------------------------------------------------</span>
00032 <span class="comment">//  This is the base class from which all the XML parser exceptions are</span>
00033 <span class="comment">//  derived. The virtual interface is very simple and most of the functionality</span>
00034 <span class="comment">//  is in this class.</span>
00035 <span class="comment">//</span>
00036 <span class="comment">//  Because all derivatives are EXACTLY the same except for the static</span>
00037 <span class="comment">//  string that is used to hold the name of the class, a macro is provided</span>
00038 <span class="comment">//  below via which they are all created.</span>
00039 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00040"></a><a class="code" href="classXMLException.html">00040</a> <span class="keyword">class </span><a class="code" href="XercesDefs_8hpp.html#a9"></a> XMLException : <span class="keyword">public</span> <a class="code" href="classXMemory.html">XMemory</a>
00041 {
00042 <span class="keyword">public</span>:
00043     <span class="comment">// -----------------------------------------------------------------------</span>
00044     <span class="comment">//  Virtual Destructor</span>
00045     <span class="comment">// -----------------------------------------------------------------------</span>
00046     <span class="keyword">virtual</span> ~XMLException();
00047 
00048 
00049     <span class="comment">// -----------------------------------------------------------------------</span>
00050     <span class="comment">//  The XML exception virtual interface</span>
00051     <span class="comment">// -----------------------------------------------------------------------</span>
00052     <span class="keyword">virtual</span> <span class="keyword">const</span> XMLCh* getType() <span class="keyword">const </span>= 0;
00053 
00054 
00055     <span class="comment">// -----------------------------------------------------------------------</span>
00056     <span class="comment">//  Getter methods</span>
00057     <span class="comment">// -----------------------------------------------------------------------</span>
00058     XMLExcepts::Codes getCode() <span class="keyword">const</span>;
00059     <span class="keyword">const</span> XMLCh* getMessage() <span class="keyword">const</span>;
00060     <span class="keyword">const</span> <span class="keywordtype">char</span>* getSrcFile() <span class="keyword">const</span>;
00061     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getSrcLine() <span class="keyword">const</span>;
00062     XMLErrorReporter::ErrTypes getErrorType() <span class="keyword">const</span>;
00063 
00064 
00065     <span class="comment">// -----------------------------------------------------------------------</span>
00066     <span class="comment">//  Setter methods</span>
00067     <span class="comment">// -----------------------------------------------------------------------</span>
00068     <span class="keywordtype">void</span> setPosition(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> file, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> line);
00069 
00070 
00071     <span class="comment">// -----------------------------------------------------------------------</span>
00072     <span class="comment">//  Hidden constructors and operators</span>
00073     <span class="comment">//</span>
00074     <span class="comment">//  NOTE:   Technically, these should be protected, since this is a</span>
00075     <span class="comment">//          base class that is never used directly. However, VC++ 6.0 will</span>
00076     <span class="comment">//          fail to catch via a reference to base class if the ctors are</span>
00077     <span class="comment">//          not public!! This seems to have been caused by the install</span>
00078     <span class="comment">//          of IE 5.0.</span>
00079     <span class="comment">// -----------------------------------------------------------------------</span>
00080     XMLException();
00081     XMLException(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span> srcFile, <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> srcLine, <a class="code" href="classMemoryManager.html">MemoryManager</a>* <span class="keyword">const</span> memoryManager = 0);
00082     XMLException(<span class="keyword">const</span> XMLException&amp; toCopy);
00083     XMLException&amp; operator=(<span class="keyword">const</span> XMLException&amp; toAssign);
00084 
00085     <span class="comment">// -----------------------------------------------------------------------</span>
00086     <span class="comment">//  Notification that lazy data has been deleted</span>
00087     <span class="comment">// -----------------------------------------------------------------------</span>
00088     <span class="keyword">static</span> <span class="keywordtype">void</span> reinitMsgMutex();
00089 
00090     <span class="keyword">static</span> <span class="keywordtype">void</span> reinitMsgLoader();
00091 
00092 <span class="keyword">protected</span> :
00093     <span class="comment">// -----------------------------------------------------------------------</span>
00094     <span class="comment">//  Protected methods</span>
00095     <span class="comment">// -----------------------------------------------------------------------</span>
00096     <span class="keywordtype">void</span> loadExceptText
00097     (
00098         <span class="keyword">const</span>   XMLExcepts::Codes toLoad
00099     );
00100     <span class="keywordtype">void</span> loadExceptText
00101     (
00102         <span class="keyword">const</span>   XMLExcepts::Codes toLoad
00103         , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span>        text1
00104         , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span>        text2 = 0
00105         , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span>        text3 = 0
00106         , <span class="keyword">const</span> XMLCh* <span class="keyword">const</span>        text4 = 0
00107     );
00108     <span class="keywordtype">void</span> loadExceptText
00109     (
00110         <span class="keyword">const</span>   XMLExcepts::Codes toLoad
00111         , <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span>         text1
00112         , <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span>         text2 = 0
00113         , <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span>         text3 = 0
00114         , <span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keyword">const</span>         text4 = 0
00115     );
00116 
00117 
00118 <span class="keyword">private</span> :
00119     <span class="comment">// -----------------------------------------------------------------------</span>
00120     <span class="comment">//  Data members</span>
00121     <span class="comment">//</span>
00122     <span class="comment">//  fCode</span>
00123     <span class="comment">//      The error code that this exception represents.</span>
00124     <span class="comment">//</span>
00125     <span class="comment">//  fSrcFile</span>
00126     <span class="comment">//  fSrcLine</span>
00127     <span class="comment">//      These are the file and line information from the source where the</span>
00128     <span class="comment">//      exception was thrown from.</span>
00129     <span class="comment">//</span>
00130     <span class="comment">//  fMsg</span>
00131     <span class="comment">//      The loaded message text for this exception.</span>
00132     <span class="comment">// -----------------------------------------------------------------------</span>
00133     XMLExcepts::Codes       fCode;
00134     <span class="keywordtype">char</span>*                   fSrcFile;
00135     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>            fSrcLine;
00136     XMLCh*                  fMsg;
00137 
00138 <span class="keyword">protected</span>:
<a name="l00139"></a><a class="code" href="classXMLException.html#p0">00139</a>     <a class="code" href="classMemoryManager.html">MemoryManager</a>*          fMemoryManager;
00140 };
00141 
00142 <span class="comment">// ---------------------------------------------------------------------------</span>
00143 <span class="comment">//  XMLException: Getter methods</span>
00144 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00145"></a><a class="code" href="classXMLException.html#a2">00145</a> <span class="keyword">inline</span> XMLExcepts::Codes <a class="code" href="classXMLException.html#a2">XMLException::getCode</a>()<span class="keyword"> const</span>
00146 <span class="keyword"></span>{
00147     <span class="keywordflow">return</span> fCode;
00148 }
00149 
<a name="l00150"></a><a class="code" href="classXMLException.html#a3">00150</a> <span class="keyword">inline</span> <span class="keyword">const</span> XMLCh* <a class="code" href="classXMLException.html#a3">XMLException::getMessage</a>()<span class="keyword"> const</span>
00151 <span class="keyword"></span>{
00152     <span class="keywordflow">return</span> fMsg;
00153 }
00154 
<a name="l00155"></a><a class="code" href="classXMLException.html#a4">00155</a> <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classXMLException.html#a4">XMLException::getSrcFile</a>()<span class="keyword"> const</span>
00156 <span class="keyword"></span>{
00157     <span class="keywordflow">if</span> (!fSrcFile)
00158         <span class="keywordflow">return</span> <span class="stringliteral">""</span>;
00159     <span class="keywordflow">return</span> fSrcFile;
00160 }
00161 
<a name="l00162"></a><a class="code" href="classXMLException.html#a5">00162</a> <span class="keyword">inline</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="classXMLException.html#a5">XMLException::getSrcLine</a>()<span class="keyword"> const</span>
00163 <span class="keyword"></span>{
00164     <span class="keywordflow">return</span> fSrcLine;
00165 }
00166 
<a name="l00167"></a><a class="code" href="classXMLException.html#a6">00167</a> <span class="keyword">inline</span> XMLErrorReporter::ErrTypes <a class="code" href="classXMLException.html#a6">XMLException::getErrorType</a>()<span class="keyword"> const</span>
00168 <span class="keyword"></span>{
00169    <span class="keywordflow">if</span> ((fCode &gt;= XMLExcepts::W_LowBounds) &amp;&amp; (fCode &lt;= XMLExcepts::W_HighBounds))
00170        <span class="keywordflow">return</span> XMLErrorReporter::ErrType_Warning;
00171    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((fCode &gt;= XMLExcepts::F_LowBounds) &amp;&amp; (fCode &lt;= XMLExcepts::F_HighBounds))
00172         <span class="keywordflow">return</span> XMLErrorReporter::ErrType_Fatal;
00173    <span class="keywordflow">else</span> <span class="keywordflow">if</span> ((fCode &gt;= XMLExcepts::E_LowBounds) &amp;&amp; (fCode &lt;= XMLExcepts::E_HighBounds))
00174         <span class="keywordflow">return</span> XMLErrorReporter::ErrType_Error;
00175    <span class="keywordflow">return</span> XMLErrorReporter::ErrTypes_Unknown;
00176 }
00177 
00178 <span class="comment">// ---------------------------------------------------------------------------</span>
00179 <span class="comment">//  This macro is used to create derived classes. They are all identical</span>
00180 <span class="comment">//  except the name of the exception, so it crazy to type them in over and</span>
00181 <span class="comment">//  over.</span>
00182 <span class="comment">// ---------------------------------------------------------------------------</span>
<a name="l00183"></a><a class="code" href="XMLException_8hpp.html#a1">00183</a> <span class="preprocessor">#define MakeXMLException(theType, expKeyword) \</span>
00184 <span class="preprocessor">class expKeyword theType : public XMLException \</span>
00185 <span class="preprocessor">{ \</span>
00186 <span class="preprocessor">public: \</span>
00187 <span class="preprocessor"> \</span>
00188 <span class="preprocessor">    theType(const   char* const         srcFile \</span>
00189 <span class="preprocessor">            , const unsigned int        srcLine \</span>
00190 <span class="preprocessor">            , const XMLExcepts::Codes toThrow \</span>
00191 <span class="preprocessor">            , MemoryManager*            memoryManager = 0) : \</span>
00192 <span class="preprocessor">        XMLException(srcFile, srcLine, memoryManager) \</span>
00193 <span class="preprocessor">    { \</span>
00194 <span class="preprocessor">        loadExceptText(toThrow); \</span>
00195 <span class="preprocessor">    } \</span>
00196 <span class="preprocessor"> \</span>
00197 <span class="preprocessor">    theType(const theType&amp; toCopy) : \</span>
00198 <span class="preprocessor"> \</span>
00199 <span class="preprocessor">        XMLException(toCopy) \</span>
00200 <span class="preprocessor">    { \</span>
00201 <span class="preprocessor">    } \</span>
00202 <span class="preprocessor">  \</span>
00203 <span class="preprocessor">    theType(const   char* const         srcFile \</span>
00204 <span class="preprocessor">            , const unsigned int        srcLine \</span>
00205 <span class="preprocessor">            , const XMLExcepts::Codes   toThrow \</span>
00206 <span class="preprocessor">            , const XMLCh* const        text1 \</span>
00207 <span class="preprocessor">            , const XMLCh* const        text2 = 0 \</span>
00208 <span class="preprocessor">            , const XMLCh* const        text3 = 0 \</span>
00209 <span class="preprocessor">            , const XMLCh* const        text4 = 0 \</span>
00210 <span class="preprocessor">            , MemoryManager*            memoryManager = 0) : \</span>
00211 <span class="preprocessor">        XMLException(srcFile, srcLine, memoryManager) \</span>
00212 <span class="preprocessor">    { \</span>
00213 <span class="preprocessor">        loadExceptText(toThrow, text1, text2, text3, text4); \</span>
00214 <span class="preprocessor">    } \</span>
00215 <span class="preprocessor"> \</span>
00216 <span class="preprocessor">    theType(const   char* const         srcFile \</span>
00217 <span class="preprocessor">            , const unsigned int        srcLine \</span>
00218 <span class="preprocessor">            , const XMLExcepts::Codes   toThrow \</span>
00219 <span class="preprocessor">            , const char* const         text1 \</span>
00220 <span class="preprocessor">            , const char* const         text2 = 0 \</span>
00221 <span class="preprocessor">            , const char* const         text3 = 0 \</span>
00222 <span class="preprocessor">            , const char* const         text4 = 0 \</span>
00223 <span class="preprocessor">            , MemoryManager*            memoryManager = 0) : \</span>
00224 <span class="preprocessor">        XMLException(srcFile, srcLine, memoryManager) \</span>
00225 <span class="preprocessor">    { \</span>
00226 <span class="preprocessor">        loadExceptText(toThrow, text1, text2, text3, text4); \</span>
00227 <span class="preprocessor">    } \</span>
00228 <span class="preprocessor"> \</span>
00229 <span class="preprocessor">    virtual ~theType() {} \</span>
00230 <span class="preprocessor"> \</span>
00231 <span class="preprocessor">    theType&amp; operator=(const theType&amp; toAssign) \</span>
00232 <span class="preprocessor">    { \</span>
00233 <span class="preprocessor">        XMLException::operator=(toAssign); \</span>
00234 <span class="preprocessor">        return *this; \</span>
00235 <span class="preprocessor">    } \</span>
00236 <span class="preprocessor"> \</span>
00237 <span class="preprocessor">    virtual XMLException* duplicate() const \</span>
00238 <span class="preprocessor">    { \</span>
00239 <span class="preprocessor">        return new (fMemoryManager) theType(*this); \</span>
00240 <span class="preprocessor">    } \</span>
00241 <span class="preprocessor"> \</span>
00242 <span class="preprocessor">    virtual const XMLCh* getType() const \</span>
00243 <span class="preprocessor">    { \</span>
00244 <span class="preprocessor">        return XMLUni::fg##theType##_Name; \</span>
00245 <span class="preprocessor">    } \</span>
00246 <span class="preprocessor"> \</span>
00247 <span class="preprocessor">private : \</span>
00248 <span class="preprocessor">    theType(); \</span>
00249 <span class="preprocessor">};</span>
00250 <span class="preprocessor"></span>
00251 
00252 
00253 <span class="comment">// ---------------------------------------------------------------------------</span>
00254 <span class="comment">//  This macros is used to actually throw an exception. It is used in order</span>
00255 <span class="comment">//  to make sure that source code line/col info is stored correctly, and to</span>
00256 <span class="comment">//  give flexibility for other stuff in the future.</span>
00257 <span class="comment">// ---------------------------------------------------------------------------</span>
00258 
<a name="l00259"></a><a class="code" href="XMLException_8hpp.html#a2">00259</a> <span class="preprocessor">#define ThrowXML(type,code) throw type(__FILE__, __LINE__, code)</span>
00260 <span class="preprocessor"></span>
<a name="l00261"></a><a class="code" href="XMLException_8hpp.html#a3">00261</a> <span class="preprocessor">#define ThrowXML1(type,code,p1) throw type(__FILE__, __LINE__, code, p1)</span>
00262 <span class="preprocessor"></span>
<a name="l00263"></a><a class="code" href="XMLException_8hpp.html#a4">00263</a> <span class="preprocessor">#define ThrowXML2(type,code,p1,p2) throw type(__FILE__, __LINE__, code, p1, p2)</span>
00264 <span class="preprocessor"></span>
<a name="l00265"></a><a class="code" href="XMLException_8hpp.html#a5">00265</a> <span class="preprocessor">#define ThrowXML3(type,code,p1,p2,p3) throw type(__FILE__, __LINE__, code, p1, p2, p3)</span>
00266 <span class="preprocessor"></span>
<a name="l00267"></a><a class="code" href="XMLException_8hpp.html#a6">00267</a> <span class="preprocessor">#define ThrowXML4(type,code,p1,p2,p3,p4) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4)</span>
00268 <span class="preprocessor"></span>
<a name="l00269"></a><a class="code" href="XMLException_8hpp.html#a7">00269</a> <span class="preprocessor">#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)</span>
00270 <span class="preprocessor"></span>
<a name="l00271"></a><a class="code" href="XMLException_8hpp.html#a8">00271</a> <span class="preprocessor">#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)</span>
00272 <span class="preprocessor"></span>
<a name="l00273"></a><a class="code" href="XMLException_8hpp.html#a9">00273</a> <span class="preprocessor">#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)</span>
00274 <span class="preprocessor"></span>
<a name="l00275"></a><a class="code" href="XMLException_8hpp.html#a10">00275</a> <span class="preprocessor">#define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr)</span>
00276 <span class="preprocessor"></span>
<a name="l00277"></a><a class="code" href="XMLException_8hpp.html#a11">00277</a> <span class="preprocessor">#define ThrowXMLwithMemMgr4(type,code,p1,p2,p3,p4,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4, memMgr)</span>
00278 <span class="preprocessor"></span>
00279 <a class="code" href="XercesDefs_8hpp.html#a4">XERCES_CPP_NAMESPACE_END</a>
00280 
00281 <span class="preprocessor">#endif</span>
</pre></div>    </FONT></TD></TR></TABLE><BR>
</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
              Copyright &copy; 1994-2004 The Apache Software Foundation.
              All Rights Reserved.
            </I></FONT></TD></TR></TABLE></BODY></HTML>