source: NonGTP/Xerces/xerces/doc/html/apiDocs/XMLException_8hpp-source.html @ 358

Revision 358, 35.4 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>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>
2  <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>
3
4  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
5
6  <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>
7  <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>
8  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
9  <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>
10  <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-18');" onMouseOver="rolloverOn('side-ext-18');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-18" onLoad="rolloverLoad('side-ext-18','../graphics/ext-18-label-2.jpg','../graphics/ext-18-label-3.jpg');" src="../graphics/ext-18-label-3.jpg" vspace="0" width="120"></A><BR>
11  <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build" 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>
12
13  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
14  <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> 
15  <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>
16  <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> 
17
18  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> 
19  <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','../graphics/ext-68-label-2.jpg','../graphics/ext-68-label-3.jpg');" src="../graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
20
21  <A href="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
22  <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>
23
24  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
25
26  <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>
27  <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> 
28  <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>
29
30  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
31
32  <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-100');" onMouseOver="rolloverOn('side-ext-100');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-100" onLoad="rolloverLoad('side-ext-100','../graphics/ext-100-label-2.jpg','../graphics/ext-100-label-3.jpg');" src="../graphics/ext-100-label-3.jpg" vspace="0" width="120"></A><BR>
33
34  <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Mail Archive" 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>
35
36
37<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>
38    <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">
39
40            <P>
41<!-- Generated by Doxygen 1.2.14 -->
42<center>
43<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
44<hr><h1>XMLException.hpp</h1><a href="XMLException_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
4500002 <font class="comment"> * Copyright 1999-2000,2004 The Apache Software Foundation.</font>
4600003 <font class="comment"> * </font>
4700004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
4800005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
4900006 <font class="comment"> * You may obtain a copy of the License at</font>
5000007 <font class="comment"> * </font>
5100008 <font class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</font>
5200009 <font class="comment"> * </font>
5300010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
5400011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
5500012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
5600013 <font class="comment"> * See the License for the specific language governing permissions and</font>
5700014 <font class="comment"> * limitations under the License.</font>
5800015 <font class="comment"> */</font>
5900016
6000017 <font class="comment">/*</font>
6100018 <font class="comment"> * $Id: XMLException.hpp,v 1.8 2004/09/08 13:56:24 peiyongz Exp $</font>
6200019 <font class="comment"> */</font>
6300020
6400021 <font class="preprocessor">#if !defined(EXCEPTION_HPP)</font>
65<a name="l00022"></a><a class="code" href="XMLException_8hpp.html#a0">00022</a> <font class="preprocessor"></font><font class="preprocessor">#define EXCEPTION_HPP</font>
6600023 <font class="preprocessor"></font>
6700024 <font class="preprocessor">#include &lt;<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>&gt;</font>
6800025 <font class="preprocessor">#include &lt;xercesc/util/XMLExceptMsgs.hpp&gt;</font>
6900026 <font class="preprocessor">#include &lt;<a class="code" href="XMLUni_8hpp.html">xercesc/util/XMLUni.hpp</a>&gt;</font>
7000027 <font class="preprocessor">#include &lt;<a class="code" href="XMLErrorReporter_8hpp.html">xercesc/framework/XMLErrorReporter.hpp</a>&gt;</font>
7100028
7200029 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
7300030
7400031 <font class="comment">// ---------------------------------------------------------------------------</font>
7500032 <font class="comment">//  This is the base class from which all the XML parser exceptions are</font>
7600033 <font class="comment">//  derived. The virtual interface is very simple and most of the functionality</font>
7700034 <font class="comment">//  is in this class.</font>
7800035 <font class="comment">//</font>
7900036 <font class="comment">//  Because all derivatives are EXACTLY the same except for the static</font>
8000037 <font class="comment">//  string that is used to hold the name of the class, a macro is provided</font>
8100038 <font class="comment">//  below via which they are all created.</font>
8200039 <font class="comment">// ---------------------------------------------------------------------------</font>
83<a name="l00040"></a><a class="code" href="classXMLException.html">00040</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a8"></a> <a class="code" href="classXMLException.html">XMLException</a> : <font class="keyword">public</font> <a class="code" href="classXMemory.html">XMemory</a>
8400041 {
8500042 <font class="keyword">public</font>:
8600043     <font class="comment">// -----------------------------------------------------------------------</font>
8700044     <font class="comment">//  Virtual Destructor</font>
8800045     <font class="comment">// -----------------------------------------------------------------------</font>
8900046     <font class="keyword">virtual</font> ~<a class="code" href="classXMLException.html">XMLException</a>();
9000047
9100048
9200049     <font class="comment">// -----------------------------------------------------------------------</font>
9300050     <font class="comment">//  The XML exception virtual interface</font>
9400051     <font class="comment">// -----------------------------------------------------------------------</font>
9500052     <font class="keyword">virtual</font> <font class="keyword">const</font> XMLCh* getType() <font class="keyword">const</font> = 0;
9600053
9700054
9800055     <font class="comment">// -----------------------------------------------------------------------</font>
9900056     <font class="comment">//  Getter methods</font>
10000057     <font class="comment">// -----------------------------------------------------------------------</font>
10100058     XMLExcepts::Codes getCode() <font class="keyword">const</font>;
10200059     <font class="keyword">const</font> XMLCh* getMessage() <font class="keyword">const</font>;
10300060     <font class="keyword">const</font> <font class="keywordtype">char</font>* getSrcFile() <font class="keyword">const</font>;
10400061     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> getSrcLine() <font class="keyword">const</font>;
10500062     <a class="code" href="classXMLErrorReporter.html#s4">XMLErrorReporter::ErrTypes</a> getErrorType() <font class="keyword">const</font>;
10600063
10700064
10800065     <font class="comment">// -----------------------------------------------------------------------</font>
10900066     <font class="comment">//  Setter methods</font>
11000067     <font class="comment">// -----------------------------------------------------------------------</font>
11100068     <font class="keywordtype">void</font> setPosition(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> file, <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> line);
11200069
11300070
11400071     <font class="comment">// -----------------------------------------------------------------------</font>
11500072     <font class="comment">//  Hidden constructors and operators</font>
11600073     <font class="comment">//</font>
11700074     <font class="comment">//  NOTE:   Technically, these should be protected, since this is a</font>
11800075     <font class="comment">//          base class that is never used directly. However, VC++ 6.0 will</font>
11900076     <font class="comment">//          fail to catch via a reference to base class if the ctors are</font>
12000077     <font class="comment">//          not public!! This seems to have been caused by the install</font>
12100078     <font class="comment">//          of IE 5.0.</font>
12200079     <font class="comment">// -----------------------------------------------------------------------</font>
12300080     <a class="code" href="classXMLException.html">XMLException</a>();
12400081     <a class="code" href="classXMLException.html">XMLException</a>(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> srcFile, <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> srcLine, <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> memoryManager = 0);
12500082     <a class="code" href="classXMLException.html">XMLException</a>(<font class="keyword">const</font> <a class="code" href="classXMLException.html">XMLException</a>&amp; toCopy);
12600083     <a class="code" href="classXMLException.html">XMLException</a>&amp; operator=(<font class="keyword">const</font> <a class="code" href="classXMLException.html">XMLException</a>&amp; toAssign);
12700084
12800085     <font class="comment">// -----------------------------------------------------------------------</font>
12900086     <font class="comment">//  Notification that lazy data has been deleted</font>
13000087     <font class="comment">// -----------------------------------------------------------------------</font>
13100088     <font class="keyword">static</font> <font class="keywordtype">void</font> reinitMsgMutex();
13200089
13300090     <font class="keyword">static</font> <font class="keywordtype">void</font> reinitMsgLoader();
13400091
13500092 <font class="keyword">protected</font> :
13600093     <font class="comment">// -----------------------------------------------------------------------</font>
13700094     <font class="comment">//  Protected methods</font>
13800095     <font class="comment">// -----------------------------------------------------------------------</font>
13900096     <font class="keywordtype">void</font> loadExceptText
14000097     (
14100098         <font class="keyword">const</font>   XMLExcepts::Codes toLoad
14200099     );
14300100     <font class="keywordtype">void</font> loadExceptText
14400101     (
14500102         <font class="keyword">const</font>   XMLExcepts::Codes toLoad
14600103         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text1
14700104         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text2 = 0
14800105         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text3 = 0
14900106         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>        text4 = 0
15000107     );
15100108     <font class="keywordtype">void</font> loadExceptText
15200109     (
15300110         <font class="keyword">const</font>   XMLExcepts::Codes toLoad
15400111         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text1
15500112         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text2 = 0
15600113         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text3 = 0
15700114         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>         text4 = 0
15800115     );
15900116
16000117
16100118 <font class="keyword">private</font> :
16200119     <font class="comment">// -----------------------------------------------------------------------</font>
16300120     <font class="comment">//  Data members</font>
16400121     <font class="comment">//</font>
16500122     <font class="comment">//  fCode</font>
16600123     <font class="comment">//      The error code that this exception represents.</font>
16700124     <font class="comment">//</font>
16800125     <font class="comment">//  fSrcFile</font>
16900126     <font class="comment">//  fSrcLine</font>
17000127     <font class="comment">//      These are the file and line information from the source where the</font>
17100128     <font class="comment">//      exception was thrown from.</font>
17200129     <font class="comment">//</font>
17300130     <font class="comment">//  fMsg</font>
17400131     <font class="comment">//      The loaded message text for this exception.</font>
17500132     <font class="comment">// -----------------------------------------------------------------------</font>
17600133     XMLExcepts::Codes       fCode;
17700134     <font class="keywordtype">char</font>*                   fSrcFile;
17800135     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>            fSrcLine;
17900136     XMLCh*                  fMsg;
18000137
18100138 <font class="keyword">protected</font>:
182<a name="l00139"></a><a class="code" href="classXMLException.html#n0">00139</a>     <a class="code" href="classMemoryManager.html">MemoryManager</a>*          fMemoryManager;
18300140 };
18400141
18500142 <font class="comment">// ---------------------------------------------------------------------------</font>
18600143 <font class="comment">//  XMLException: Getter methods</font>
18700144 <font class="comment">// ---------------------------------------------------------------------------</font>
188<a name="l00145"></a><a class="code" href="classXMLException.html#a2">00145</a> <font class="keyword">inline</font> XMLExcepts::Codes <a class="code" href="classXMLException.html#a2">XMLException::getCode</a>()<font class="keyword"> const</font>
18900146 <font class="keyword"></font>{
19000147     <font class="keywordflow">return</font> fCode;
19100148 }
19200149
193<a name="l00150"></a><a class="code" href="classXMLException.html#a3">00150</a> <font class="keyword">inline</font> <font class="keyword">const</font> XMLCh* <a class="code" href="classXMLException.html#a3">XMLException::getMessage</a>()<font class="keyword"> const</font>
19400151 <font class="keyword"></font>{
19500152     <font class="keywordflow">return</font> fMsg;
19600153 }
19700154
198<a name="l00155"></a><a class="code" href="classXMLException.html#a4">00155</a> <font class="keyword">inline</font> <font class="keyword">const</font> <font class="keywordtype">char</font>* <a class="code" href="classXMLException.html#a4">XMLException::getSrcFile</a>()<font class="keyword"> const</font>
19900156 <font class="keyword"></font>{
20000157     <font class="keywordflow">if</font> (!fSrcFile)
20100158         <font class="keywordflow">return</font> <font class="stringliteral">""</font>;
20200159     <font class="keywordflow">return</font> fSrcFile;
20300160 }
20400161
205<a name="l00162"></a><a class="code" href="classXMLException.html#a5">00162</a> <font class="keyword">inline</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="classXMLException.html#a5">XMLException::getSrcLine</a>()<font class="keyword"> const</font>
20600163 <font class="keyword"></font>{
20700164     <font class="keywordflow">return</font> fSrcLine;
20800165 }
20900166
210<a name="l00167"></a><a class="code" href="classXMLException.html#a6">00167</a> <font class="keyword">inline</font> <a class="code" href="classXMLErrorReporter.html#s4">XMLErrorReporter::ErrTypes</a> <a class="code" href="classXMLException.html#a6">XMLException::getErrorType</a>()<font class="keyword"> const</font>
21100168 <font class="keyword"></font>{
21200169    <font class="keywordflow">if</font> ((fCode &gt;= XMLExcepts::W_LowBounds) &amp;&amp; (fCode &lt;= XMLExcepts::W_HighBounds))
21300170        <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s0">XMLErrorReporter::ErrType_Warning</a>;
21400171    <font class="keywordflow">else</font> <font class="keywordflow">if</font> ((fCode &gt;= XMLExcepts::F_LowBounds) &amp;&amp; (fCode &lt;= XMLExcepts::F_HighBounds))
21500172         <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s2">XMLErrorReporter::ErrType_Fatal</a>;
21600173    <font class="keywordflow">else</font> <font class="keywordflow">if</font> ((fCode &gt;= XMLExcepts::E_LowBounds) &amp;&amp; (fCode &lt;= XMLExcepts::E_HighBounds))
21700174         <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s1">XMLErrorReporter::ErrType_Error</a>;
21800175    <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s3">XMLErrorReporter::ErrTypes_Unknown</a>;
21900176 }
22000177
22100178 <font class="comment">// ---------------------------------------------------------------------------</font>
22200179 <font class="comment">//  This macro is used to create derived classes. They are all identical</font>
22300180 <font class="comment">//  except the name of the exception, so it crazy to type them in over and</font>
22400181 <font class="comment">//  over.</font>
22500182 <font class="comment">// ---------------------------------------------------------------------------</font>
226<a name="l00183"></a><a class="code" href="XMLException_8hpp.html#a1">00183</a> <font class="preprocessor">#define MakeXMLException(theType, expKeyword) \</font>
22700184 <font class="preprocessor">class expKeyword theType : public XMLException \</font>
22800185 <font class="preprocessor">{ \</font>
22900186 <font class="preprocessor">public: \</font>
23000187 <font class="preprocessor"> \</font>
23100188 <font class="preprocessor">    theType(const   char* const         srcFile \</font>
23200189 <font class="preprocessor">            , const unsigned int        srcLine \</font>
23300190 <font class="preprocessor">            , const XMLExcepts::Codes toThrow \</font>
23400191 <font class="preprocessor">            , MemoryManager*            memoryManager = 0) : \</font>
23500192 <font class="preprocessor">        XMLException(srcFile, srcLine, memoryManager) \</font>
23600193 <font class="preprocessor">    { \</font>
23700194 <font class="preprocessor">        loadExceptText(toThrow); \</font>
23800195 <font class="preprocessor">    } \</font>
23900196 <font class="preprocessor"> \</font>
24000197 <font class="preprocessor">    theType(const theType&amp; toCopy) : \</font>
24100198 <font class="preprocessor"> \</font>
24200199 <font class="preprocessor">        XMLException(toCopy) \</font>
24300200 <font class="preprocessor">    { \</font>
24400201 <font class="preprocessor">    } \</font>
24500202 <font class="preprocessor">  \</font>
24600203 <font class="preprocessor">    theType(const   char* const         srcFile \</font>
24700204 <font class="preprocessor">            , const unsigned int        srcLine \</font>
24800205 <font class="preprocessor">            , const XMLExcepts::Codes   toThrow \</font>
24900206 <font class="preprocessor">            , const XMLCh* const        text1 \</font>
25000207 <font class="preprocessor">            , const XMLCh* const        text2 = 0 \</font>
25100208 <font class="preprocessor">            , const XMLCh* const        text3 = 0 \</font>
25200209 <font class="preprocessor">            , const XMLCh* const        text4 = 0 \</font>
25300210 <font class="preprocessor">            , MemoryManager*            memoryManager = 0) : \</font>
25400211 <font class="preprocessor">        XMLException(srcFile, srcLine, memoryManager) \</font>
25500212 <font class="preprocessor">    { \</font>
25600213 <font class="preprocessor">        loadExceptText(toThrow, text1, text2, text3, text4); \</font>
25700214 <font class="preprocessor">    } \</font>
25800215 <font class="preprocessor"> \</font>
25900216 <font class="preprocessor">    theType(const   char* const         srcFile \</font>
26000217 <font class="preprocessor">            , const unsigned int        srcLine \</font>
26100218 <font class="preprocessor">            , const XMLExcepts::Codes   toThrow \</font>
26200219 <font class="preprocessor">            , const char* const         text1 \</font>
26300220 <font class="preprocessor">            , const char* const         text2 = 0 \</font>
26400221 <font class="preprocessor">            , const char* const         text3 = 0 \</font>
26500222 <font class="preprocessor">            , const char* const         text4 = 0 \</font>
26600223 <font class="preprocessor">            , MemoryManager*            memoryManager = 0) : \</font>
26700224 <font class="preprocessor">        XMLException(srcFile, srcLine, memoryManager) \</font>
26800225 <font class="preprocessor">    { \</font>
26900226 <font class="preprocessor">        loadExceptText(toThrow, text1, text2, text3, text4); \</font>
27000227 <font class="preprocessor">    } \</font>
27100228 <font class="preprocessor"> \</font>
27200229 <font class="preprocessor">    virtual ~theType() {} \</font>
27300230 <font class="preprocessor"> \</font>
27400231 <font class="preprocessor">    theType&amp; operator=(const theType&amp; toAssign) \</font>
27500232 <font class="preprocessor">    { \</font>
27600233 <font class="preprocessor">        XMLException::operator=(toAssign); \</font>
27700234 <font class="preprocessor">        return *this; \</font>
27800235 <font class="preprocessor">    } \</font>
27900236 <font class="preprocessor"> \</font>
28000237 <font class="preprocessor">    virtual XMLException* duplicate() const \</font>
28100238 <font class="preprocessor">    { \</font>
28200239 <font class="preprocessor">        return new (fMemoryManager) theType(*this); \</font>
28300240 <font class="preprocessor">    } \</font>
28400241 <font class="preprocessor"> \</font>
28500242 <font class="preprocessor">    virtual const XMLCh* getType() const \</font>
28600243 <font class="preprocessor">    { \</font>
28700244 <font class="preprocessor">        return XMLUni::fg##theType##_Name; \</font>
28800245 <font class="preprocessor">    } \</font>
28900246 <font class="preprocessor"> \</font>
29000247 <font class="preprocessor">private : \</font>
29100248 <font class="preprocessor">    theType(); \</font>
29200249 <font class="preprocessor">};</font>
29300250 <font class="preprocessor"></font>
29400251
29500252
29600253 <font class="comment">// ---------------------------------------------------------------------------</font>
29700254 <font class="comment">//  This macros is used to actually throw an exception. It is used in order</font>
29800255 <font class="comment">//  to make sure that source code line/col info is stored correctly, and to</font>
29900256 <font class="comment">//  give flexibility for other stuff in the future.</font>
30000257 <font class="comment">// ---------------------------------------------------------------------------</font>
30100258
302<a name="l00259"></a><a class="code" href="XMLException_8hpp.html#a2">00259</a> <font class="preprocessor">#define ThrowXML(type,code) throw type(__FILE__, __LINE__, code)</font>
30300260 <font class="preprocessor"></font>
304<a name="l00261"></a><a class="code" href="XMLException_8hpp.html#a3">00261</a> <font class="preprocessor">#define ThrowXML1(type,code,p1) throw type(__FILE__, __LINE__, code, p1)</font>
30500262 <font class="preprocessor"></font>
306<a name="l00263"></a><a class="code" href="XMLException_8hpp.html#a4">00263</a> <font class="preprocessor">#define ThrowXML2(type,code,p1,p2) throw type(__FILE__, __LINE__, code, p1, p2)</font>
30700264 <font class="preprocessor"></font>
308<a name="l00265"></a><a class="code" href="XMLException_8hpp.html#a5">00265</a> <font class="preprocessor">#define ThrowXML3(type,code,p1,p2,p3) throw type(__FILE__, __LINE__, code, p1, p2, p3)</font>
30900266 <font class="preprocessor"></font>
310<a name="l00267"></a><a class="code" href="XMLException_8hpp.html#a6">00267</a> <font class="preprocessor">#define ThrowXML4(type,code,p1,p2,p3,p4) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4)</font>
31100268 <font class="preprocessor"></font>
312<a name="l00269"></a><a class="code" href="XMLException_8hpp.html#a7">00269</a> <font class="preprocessor">#define ThrowXMLwithMemMgr(type,code,memMgr) throw type(__FILE__, __LINE__, code, memMgr)</font>
31300270 <font class="preprocessor"></font>
314<a name="l00271"></a><a class="code" href="XMLException_8hpp.html#a8">00271</a> <font class="preprocessor">#define ThrowXMLwithMemMgr1(type,code,p1,memMgr) throw type(__FILE__, __LINE__, code, p1, 0, 0, 0, memMgr)</font>
31500272 <font class="preprocessor"></font>
316<a name="l00273"></a><a class="code" href="XMLException_8hpp.html#a9">00273</a> <font class="preprocessor">#define ThrowXMLwithMemMgr2(type,code,p1,p2,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, 0, 0, memMgr)</font>
31700274 <font class="preprocessor"></font>
318<a name="l00275"></a><a class="code" href="XMLException_8hpp.html#a10">00275</a> <font class="preprocessor">#define ThrowXMLwithMemMgr3(type,code,p1,p2,p3,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, 0, memMgr)</font>
31900276 <font class="preprocessor"></font>
320<a name="l00277"></a><a class="code" href="XMLException_8hpp.html#a11">00277</a> <font class="preprocessor">#define ThrowXMLwithMemMgr4(type,code,p1,p2,p3,p4,memMgr) throw type(__FILE__, __LINE__, code, p1, p2, p3, p4, memMgr)</font>
32100278 <font class="preprocessor"></font>
32200279 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
32300280
32400281 <font class="preprocessor">#endif</font>
325</pre></div>    </FONT></TD></TR></TABLE><BR>
326</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>
327              Copyright &copy; 1994-2004 The Apache Software Foundation.
328              All Rights Reserved.
329            </I></FONT></TD></TR></TABLE></BODY></HTML>
Note: See TracBrowser for help on using the repository browser.