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"> </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> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> </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>
|
---|
45 | 00002 <font class="comment"> * Copyright 1999-2000,2004 The Apache Software Foundation.</font>
|
---|
46 | 00003 <font class="comment"> * </font>
|
---|
47 | 00004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
|
---|
48 | 00005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
|
---|
49 | 00006 <font class="comment"> * You may obtain a copy of the License at</font>
|
---|
50 | 00007 <font class="comment"> * </font>
|
---|
51 | 00008 <font class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</font>
|
---|
52 | 00009 <font class="comment"> * </font>
|
---|
53 | 00010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
|
---|
54 | 00011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
|
---|
55 | 00012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
|
---|
56 | 00013 <font class="comment"> * See the License for the specific language governing permissions and</font>
|
---|
57 | 00014 <font class="comment"> * limitations under the License.</font>
|
---|
58 | 00015 <font class="comment"> */</font>
|
---|
59 | 00016
|
---|
60 | 00017 <font class="comment">/*</font>
|
---|
61 | 00018 <font class="comment"> * $Id: XMLException.hpp,v 1.8 2004/09/08 13:56:24 peiyongz Exp $</font>
|
---|
62 | 00019 <font class="comment"> */</font>
|
---|
63 | 00020
|
---|
64 | 00021 <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>
|
---|
66 | 00023 <font class="preprocessor"></font>
|
---|
67 | 00024 <font class="preprocessor">#include <<a class="code" href="XMemory_8hpp.html">xercesc/util/XMemory.hpp</a>></font>
|
---|
68 | 00025 <font class="preprocessor">#include <xercesc/util/XMLExceptMsgs.hpp></font>
|
---|
69 | 00026 <font class="preprocessor">#include <<a class="code" href="XMLUni_8hpp.html">xercesc/util/XMLUni.hpp</a>></font>
|
---|
70 | 00027 <font class="preprocessor">#include <<a class="code" href="XMLErrorReporter_8hpp.html">xercesc/framework/XMLErrorReporter.hpp</a>></font>
|
---|
71 | 00028
|
---|
72 | 00029 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
|
---|
73 | 00030
|
---|
74 | 00031 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
75 | 00032 <font class="comment">// This is the base class from which all the XML parser exceptions are</font>
|
---|
76 | 00033 <font class="comment">// derived. The virtual interface is very simple and most of the functionality</font>
|
---|
77 | 00034 <font class="comment">// is in this class.</font>
|
---|
78 | 00035 <font class="comment">//</font>
|
---|
79 | 00036 <font class="comment">// Because all derivatives are EXACTLY the same except for the static</font>
|
---|
80 | 00037 <font class="comment">// string that is used to hold the name of the class, a macro is provided</font>
|
---|
81 | 00038 <font class="comment">// below via which they are all created.</font>
|
---|
82 | 00039 <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>
|
---|
84 | 00041 {
|
---|
85 | 00042 <font class="keyword">public</font>:
|
---|
86 | 00043 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
87 | 00044 <font class="comment">// Virtual Destructor</font>
|
---|
88 | 00045 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
89 | 00046 <font class="keyword">virtual</font> ~<a class="code" href="classXMLException.html">XMLException</a>();
|
---|
90 | 00047
|
---|
91 | 00048
|
---|
92 | 00049 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
93 | 00050 <font class="comment">// The XML exception virtual interface</font>
|
---|
94 | 00051 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
95 | 00052 <font class="keyword">virtual</font> <font class="keyword">const</font> XMLCh* getType() <font class="keyword">const</font> = 0;
|
---|
96 | 00053
|
---|
97 | 00054
|
---|
98 | 00055 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
99 | 00056 <font class="comment">// Getter methods</font>
|
---|
100 | 00057 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
101 | 00058 XMLExcepts::Codes getCode() <font class="keyword">const</font>;
|
---|
102 | 00059 <font class="keyword">const</font> XMLCh* getMessage() <font class="keyword">const</font>;
|
---|
103 | 00060 <font class="keyword">const</font> <font class="keywordtype">char</font>* getSrcFile() <font class="keyword">const</font>;
|
---|
104 | 00061 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> getSrcLine() <font class="keyword">const</font>;
|
---|
105 | 00062 <a class="code" href="classXMLErrorReporter.html#s4">XMLErrorReporter::ErrTypes</a> getErrorType() <font class="keyword">const</font>;
|
---|
106 | 00063
|
---|
107 | 00064
|
---|
108 | 00065 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
109 | 00066 <font class="comment">// Setter methods</font>
|
---|
110 | 00067 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
111 | 00068 <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);
|
---|
112 | 00069
|
---|
113 | 00070
|
---|
114 | 00071 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
115 | 00072 <font class="comment">// Hidden constructors and operators</font>
|
---|
116 | 00073 <font class="comment">//</font>
|
---|
117 | 00074 <font class="comment">// NOTE: Technically, these should be protected, since this is a</font>
|
---|
118 | 00075 <font class="comment">// base class that is never used directly. However, VC++ 6.0 will</font>
|
---|
119 | 00076 <font class="comment">// fail to catch via a reference to base class if the ctors are</font>
|
---|
120 | 00077 <font class="comment">// not public!! This seems to have been caused by the install</font>
|
---|
121 | 00078 <font class="comment">// of IE 5.0.</font>
|
---|
122 | 00079 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
123 | 00080 <a class="code" href="classXMLException.html">XMLException</a>();
|
---|
124 | 00081 <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);
|
---|
125 | 00082 <a class="code" href="classXMLException.html">XMLException</a>(<font class="keyword">const</font> <a class="code" href="classXMLException.html">XMLException</a>& toCopy);
|
---|
126 | 00083 <a class="code" href="classXMLException.html">XMLException</a>& operator=(<font class="keyword">const</font> <a class="code" href="classXMLException.html">XMLException</a>& toAssign);
|
---|
127 | 00084
|
---|
128 | 00085 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
129 | 00086 <font class="comment">// Notification that lazy data has been deleted</font>
|
---|
130 | 00087 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
131 | 00088 <font class="keyword">static</font> <font class="keywordtype">void</font> reinitMsgMutex();
|
---|
132 | 00089
|
---|
133 | 00090 <font class="keyword">static</font> <font class="keywordtype">void</font> reinitMsgLoader();
|
---|
134 | 00091
|
---|
135 | 00092 <font class="keyword">protected</font> :
|
---|
136 | 00093 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
137 | 00094 <font class="comment">// Protected methods</font>
|
---|
138 | 00095 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
139 | 00096 <font class="keywordtype">void</font> loadExceptText
|
---|
140 | 00097 (
|
---|
141 | 00098 <font class="keyword">const</font> XMLExcepts::Codes toLoad
|
---|
142 | 00099 );
|
---|
143 | 00100 <font class="keywordtype">void</font> loadExceptText
|
---|
144 | 00101 (
|
---|
145 | 00102 <font class="keyword">const</font> XMLExcepts::Codes toLoad
|
---|
146 | 00103 , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> text1
|
---|
147 | 00104 , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> text2 = 0
|
---|
148 | 00105 , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> text3 = 0
|
---|
149 | 00106 , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> text4 = 0
|
---|
150 | 00107 );
|
---|
151 | 00108 <font class="keywordtype">void</font> loadExceptText
|
---|
152 | 00109 (
|
---|
153 | 00110 <font class="keyword">const</font> XMLExcepts::Codes toLoad
|
---|
154 | 00111 , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> text1
|
---|
155 | 00112 , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> text2 = 0
|
---|
156 | 00113 , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> text3 = 0
|
---|
157 | 00114 , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> text4 = 0
|
---|
158 | 00115 );
|
---|
159 | 00116
|
---|
160 | 00117
|
---|
161 | 00118 <font class="keyword">private</font> :
|
---|
162 | 00119 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
163 | 00120 <font class="comment">// Data members</font>
|
---|
164 | 00121 <font class="comment">//</font>
|
---|
165 | 00122 <font class="comment">// fCode</font>
|
---|
166 | 00123 <font class="comment">// The error code that this exception represents.</font>
|
---|
167 | 00124 <font class="comment">//</font>
|
---|
168 | 00125 <font class="comment">// fSrcFile</font>
|
---|
169 | 00126 <font class="comment">// fSrcLine</font>
|
---|
170 | 00127 <font class="comment">// These are the file and line information from the source where the</font>
|
---|
171 | 00128 <font class="comment">// exception was thrown from.</font>
|
---|
172 | 00129 <font class="comment">//</font>
|
---|
173 | 00130 <font class="comment">// fMsg</font>
|
---|
174 | 00131 <font class="comment">// The loaded message text for this exception.</font>
|
---|
175 | 00132 <font class="comment">// -----------------------------------------------------------------------</font>
|
---|
176 | 00133 XMLExcepts::Codes fCode;
|
---|
177 | 00134 <font class="keywordtype">char</font>* fSrcFile;
|
---|
178 | 00135 <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> fSrcLine;
|
---|
179 | 00136 XMLCh* fMsg;
|
---|
180 | 00137
|
---|
181 | 00138 <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;
|
---|
183 | 00140 };
|
---|
184 | 00141
|
---|
185 | 00142 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
186 | 00143 <font class="comment">// XMLException: Getter methods</font>
|
---|
187 | 00144 <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>
|
---|
189 | 00146 <font class="keyword"></font>{
|
---|
190 | 00147 <font class="keywordflow">return</font> fCode;
|
---|
191 | 00148 }
|
---|
192 | 00149
|
---|
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>
|
---|
194 | 00151 <font class="keyword"></font>{
|
---|
195 | 00152 <font class="keywordflow">return</font> fMsg;
|
---|
196 | 00153 }
|
---|
197 | 00154
|
---|
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>
|
---|
199 | 00156 <font class="keyword"></font>{
|
---|
200 | 00157 <font class="keywordflow">if</font> (!fSrcFile)
|
---|
201 | 00158 <font class="keywordflow">return</font> <font class="stringliteral">""</font>;
|
---|
202 | 00159 <font class="keywordflow">return</font> fSrcFile;
|
---|
203 | 00160 }
|
---|
204 | 00161
|
---|
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>
|
---|
206 | 00163 <font class="keyword"></font>{
|
---|
207 | 00164 <font class="keywordflow">return</font> fSrcLine;
|
---|
208 | 00165 }
|
---|
209 | 00166
|
---|
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>
|
---|
211 | 00168 <font class="keyword"></font>{
|
---|
212 | 00169 <font class="keywordflow">if</font> ((fCode >= XMLExcepts::W_LowBounds) && (fCode <= XMLExcepts::W_HighBounds))
|
---|
213 | 00170 <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s0">XMLErrorReporter::ErrType_Warning</a>;
|
---|
214 | 00171 <font class="keywordflow">else</font> <font class="keywordflow">if</font> ((fCode >= XMLExcepts::F_LowBounds) && (fCode <= XMLExcepts::F_HighBounds))
|
---|
215 | 00172 <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s2">XMLErrorReporter::ErrType_Fatal</a>;
|
---|
216 | 00173 <font class="keywordflow">else</font> <font class="keywordflow">if</font> ((fCode >= XMLExcepts::E_LowBounds) && (fCode <= XMLExcepts::E_HighBounds))
|
---|
217 | 00174 <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s1">XMLErrorReporter::ErrType_Error</a>;
|
---|
218 | 00175 <font class="keywordflow">return</font> <a class="code" href="classXMLErrorReporter.html#s4s3">XMLErrorReporter::ErrTypes_Unknown</a>;
|
---|
219 | 00176 }
|
---|
220 | 00177
|
---|
221 | 00178 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
222 | 00179 <font class="comment">// This macro is used to create derived classes. They are all identical</font>
|
---|
223 | 00180 <font class="comment">// except the name of the exception, so it crazy to type them in over and</font>
|
---|
224 | 00181 <font class="comment">// over.</font>
|
---|
225 | 00182 <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>
|
---|
227 | 00184 <font class="preprocessor">class expKeyword theType : public XMLException \</font>
|
---|
228 | 00185 <font class="preprocessor">{ \</font>
|
---|
229 | 00186 <font class="preprocessor">public: \</font>
|
---|
230 | 00187 <font class="preprocessor"> \</font>
|
---|
231 | 00188 <font class="preprocessor"> theType(const char* const srcFile \</font>
|
---|
232 | 00189 <font class="preprocessor"> , const unsigned int srcLine \</font>
|
---|
233 | 00190 <font class="preprocessor"> , const XMLExcepts::Codes toThrow \</font>
|
---|
234 | 00191 <font class="preprocessor"> , MemoryManager* memoryManager = 0) : \</font>
|
---|
235 | 00192 <font class="preprocessor"> XMLException(srcFile, srcLine, memoryManager) \</font>
|
---|
236 | 00193 <font class="preprocessor"> { \</font>
|
---|
237 | 00194 <font class="preprocessor"> loadExceptText(toThrow); \</font>
|
---|
238 | 00195 <font class="preprocessor"> } \</font>
|
---|
239 | 00196 <font class="preprocessor"> \</font>
|
---|
240 | 00197 <font class="preprocessor"> theType(const theType& toCopy) : \</font>
|
---|
241 | 00198 <font class="preprocessor"> \</font>
|
---|
242 | 00199 <font class="preprocessor"> XMLException(toCopy) \</font>
|
---|
243 | 00200 <font class="preprocessor"> { \</font>
|
---|
244 | 00201 <font class="preprocessor"> } \</font>
|
---|
245 | 00202 <font class="preprocessor"> \</font>
|
---|
246 | 00203 <font class="preprocessor"> theType(const char* const srcFile \</font>
|
---|
247 | 00204 <font class="preprocessor"> , const unsigned int srcLine \</font>
|
---|
248 | 00205 <font class="preprocessor"> , const XMLExcepts::Codes toThrow \</font>
|
---|
249 | 00206 <font class="preprocessor"> , const XMLCh* const text1 \</font>
|
---|
250 | 00207 <font class="preprocessor"> , const XMLCh* const text2 = 0 \</font>
|
---|
251 | 00208 <font class="preprocessor"> , const XMLCh* const text3 = 0 \</font>
|
---|
252 | 00209 <font class="preprocessor"> , const XMLCh* const text4 = 0 \</font>
|
---|
253 | 00210 <font class="preprocessor"> , MemoryManager* memoryManager = 0) : \</font>
|
---|
254 | 00211 <font class="preprocessor"> XMLException(srcFile, srcLine, memoryManager) \</font>
|
---|
255 | 00212 <font class="preprocessor"> { \</font>
|
---|
256 | 00213 <font class="preprocessor"> loadExceptText(toThrow, text1, text2, text3, text4); \</font>
|
---|
257 | 00214 <font class="preprocessor"> } \</font>
|
---|
258 | 00215 <font class="preprocessor"> \</font>
|
---|
259 | 00216 <font class="preprocessor"> theType(const char* const srcFile \</font>
|
---|
260 | 00217 <font class="preprocessor"> , const unsigned int srcLine \</font>
|
---|
261 | 00218 <font class="preprocessor"> , const XMLExcepts::Codes toThrow \</font>
|
---|
262 | 00219 <font class="preprocessor"> , const char* const text1 \</font>
|
---|
263 | 00220 <font class="preprocessor"> , const char* const text2 = 0 \</font>
|
---|
264 | 00221 <font class="preprocessor"> , const char* const text3 = 0 \</font>
|
---|
265 | 00222 <font class="preprocessor"> , const char* const text4 = 0 \</font>
|
---|
266 | 00223 <font class="preprocessor"> , MemoryManager* memoryManager = 0) : \</font>
|
---|
267 | 00224 <font class="preprocessor"> XMLException(srcFile, srcLine, memoryManager) \</font>
|
---|
268 | 00225 <font class="preprocessor"> { \</font>
|
---|
269 | 00226 <font class="preprocessor"> loadExceptText(toThrow, text1, text2, text3, text4); \</font>
|
---|
270 | 00227 <font class="preprocessor"> } \</font>
|
---|
271 | 00228 <font class="preprocessor"> \</font>
|
---|
272 | 00229 <font class="preprocessor"> virtual ~theType() {} \</font>
|
---|
273 | 00230 <font class="preprocessor"> \</font>
|
---|
274 | 00231 <font class="preprocessor"> theType& operator=(const theType& toAssign) \</font>
|
---|
275 | 00232 <font class="preprocessor"> { \</font>
|
---|
276 | 00233 <font class="preprocessor"> XMLException::operator=(toAssign); \</font>
|
---|
277 | 00234 <font class="preprocessor"> return *this; \</font>
|
---|
278 | 00235 <font class="preprocessor"> } \</font>
|
---|
279 | 00236 <font class="preprocessor"> \</font>
|
---|
280 | 00237 <font class="preprocessor"> virtual XMLException* duplicate() const \</font>
|
---|
281 | 00238 <font class="preprocessor"> { \</font>
|
---|
282 | 00239 <font class="preprocessor"> return new (fMemoryManager) theType(*this); \</font>
|
---|
283 | 00240 <font class="preprocessor"> } \</font>
|
---|
284 | 00241 <font class="preprocessor"> \</font>
|
---|
285 | 00242 <font class="preprocessor"> virtual const XMLCh* getType() const \</font>
|
---|
286 | 00243 <font class="preprocessor"> { \</font>
|
---|
287 | 00244 <font class="preprocessor"> return XMLUni::fg##theType##_Name; \</font>
|
---|
288 | 00245 <font class="preprocessor"> } \</font>
|
---|
289 | 00246 <font class="preprocessor"> \</font>
|
---|
290 | 00247 <font class="preprocessor">private : \</font>
|
---|
291 | 00248 <font class="preprocessor"> theType(); \</font>
|
---|
292 | 00249 <font class="preprocessor">};</font>
|
---|
293 | 00250 <font class="preprocessor"></font>
|
---|
294 | 00251
|
---|
295 | 00252
|
---|
296 | 00253 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
297 | 00254 <font class="comment">// This macros is used to actually throw an exception. It is used in order</font>
|
---|
298 | 00255 <font class="comment">// to make sure that source code line/col info is stored correctly, and to</font>
|
---|
299 | 00256 <font class="comment">// give flexibility for other stuff in the future.</font>
|
---|
300 | 00257 <font class="comment">// ---------------------------------------------------------------------------</font>
|
---|
301 | 00258
|
---|
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>
|
---|
303 | 00260 <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>
|
---|
305 | 00262 <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>
|
---|
307 | 00264 <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>
|
---|
309 | 00266 <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>
|
---|
311 | 00268 <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>
|
---|
313 | 00270 <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>
|
---|
315 | 00272 <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>
|
---|
317 | 00274 <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>
|
---|
319 | 00276 <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>
|
---|
321 | 00278 <font class="preprocessor"></font>
|
---|
322 | 00279 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
|
---|
323 | 00280
|
---|
324 | 00281 <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 © 1994-2004 The Apache Software Foundation.
|
---|
328 | All Rights Reserved.
|
---|
329 | </I></FONT></TD></TR></TABLE></BODY></HTML>
|
---|