Xerces-C++ 3.2.5
DOMException.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP
24
27
29
30
50class MemoryManager;
51
53public:
54 // -----------------------------------------------------------------------
55 // Class Types
56 // -----------------------------------------------------------------------
138 INDEX_SIZE_ERR = 1,
139 DOMSTRING_SIZE_ERR = 2,
140 HIERARCHY_REQUEST_ERR = 3,
141 WRONG_DOCUMENT_ERR = 4,
142 INVALID_CHARACTER_ERR = 5,
143 NO_DATA_ALLOWED_ERR = 6,
144 NO_MODIFICATION_ALLOWED_ERR = 7,
145 NOT_FOUND_ERR = 8,
146 NOT_SUPPORTED_ERR = 9,
147 INUSE_ATTRIBUTE_ERR = 10,
148 INVALID_STATE_ERR = 11,
149 SYNTAX_ERR = 12,
150 INVALID_MODIFICATION_ERR = 13,
151 NAMESPACE_ERR = 14,
152 INVALID_ACCESS_ERR = 15,
153 VALIDATION_ERR = 16,
154 TYPE_MISMATCH_ERR = 17
155 };
157
158public:
159 // -----------------------------------------------------------------------
160 // Constructors
161 // -----------------------------------------------------------------------
169
177 DOMException(short code,
178 short messageCode = 0,
179 MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager);
180
187
189
190 // -----------------------------------------------------------------------
191 // Destructors
192 // -----------------------------------------------------------------------
199 virtual ~DOMException();
201
202
203public:
204 // -----------------------------------------------------------------------
205 // Getter
206 // -----------------------------------------------------------------------
207 inline const XMLCh* getMessage() const;
208
209 // -----------------------------------------------------------------------
210 // Class Types
211 // -----------------------------------------------------------------------
218 short code;
219
226 const XMLCh *msg;
228
229protected:
231
232private:
233
241 bool fMsgOwned;
242
243private:
244 // -----------------------------------------------------------------------
245 // Unimplemented constructors and operators
246 // -----------------------------------------------------------------------
247 DOMException & operator = (const DOMException &);
248};
249
250inline const XMLCh* DOMException::getMessage() const
251{
252 return msg;
253}
254
256
257#endif
#define CDOM_EXPORT
Definition XercesDefs.hpp:166
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
uint16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
Definition DOMException.hpp:52
DOMException()
Default constructor for DOMException.
const XMLCh * msg
A string value.
Definition DOMException.hpp:226
DOMException(short code, short messageCode=0, MemoryManager *const memoryManager=XMLPlatformUtils::fgMemoryManager)
Constructor which takes an error code and an optional message code.
MemoryManager * fMemoryManager
Definition DOMException.hpp:230
DOMException(const DOMException &other)
Copy constructor.
virtual ~DOMException()
Destructor for DOMException.
short code
A code value, from the set defined by the ExceptionCode enum, indicating the type of error that occur...
Definition DOMException.hpp:218
const XMLCh * getMessage() const
Definition DOMException.hpp:250
ExceptionCode
ExceptionCode.
Definition DOMException.hpp:137
Configurable memory manager.
Definition MemoryManager.hpp:40
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121