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
25#include <xercesc/util/XercesDefs.hpp>
26#include <xercesc/util/PlatformUtils.hpp>
27
28 XERCES_CPP_NAMESPACE_BEGIN
29
30
50 class MemoryManager;
51
52 class CDOM_EXPORT DOMException {
53 public:
54 // -----------------------------------------------------------------------
55 // Class Types
56 // -----------------------------------------------------------------------
137 enum ExceptionCode {
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
158 public:
159 // -----------------------------------------------------------------------
160 // Constructors
161 // -----------------------------------------------------------------------
168 DOMException();
169
177 DOMException(short code,
178 short messageCode = 0,
179 MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager);
180
186 DOMException(const DOMException &other);
187
189
190 // -----------------------------------------------------------------------
191 // Destructors
192 // -----------------------------------------------------------------------
199 virtual ~DOMException();
201
202
203 public:
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
229 protected:
230 MemoryManager* fMemoryManager;
231
232 private:
233
241 bool fMsgOwned;
242
243 private:
244 // -----------------------------------------------------------------------
245 // Unimplemented constructors and operators
246 // -----------------------------------------------------------------------
247 DOMException & operator = (const DOMException &);
248};
249
250 inline const XMLCh* DOMException::getMessage() const
251{
252 return msg;
253}
254
255 XERCES_CPP_NAMESPACE_END
256
257#endif
PlatformUtils.hpp
XercesDefs.hpp
CDOM_EXPORT
#define CDOM_EXPORT
Definition XercesDefs.hpp:166
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLCh
uint16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
DOMException
Definition DOMException.hpp:52
DOMException::DOMException
DOMException()
Default constructor for DOMException.
DOMException::msg
const XMLCh * msg
A string value.
Definition DOMException.hpp:226
DOMException::DOMException
DOMException(short code, short messageCode=0, MemoryManager *const memoryManager=XMLPlatformUtils::fgMemoryManager)
Constructor which takes an error code and an optional message code.
DOMException::fMemoryManager
MemoryManager * fMemoryManager
Definition DOMException.hpp:230
DOMException::DOMException
DOMException(const DOMException &other)
Copy constructor.
DOMException::~DOMException
virtual ~DOMException()
Destructor for DOMException.
DOMException::code
short code
A code value, from the set defined by the ExceptionCode enum, indicating the type of error that occur...
Definition DOMException.hpp:218
DOMException::getMessage
const XMLCh * getMessage() const
Definition DOMException.hpp:250
DOMException::ExceptionCode
ExceptionCode
ExceptionCode.
Definition DOMException.hpp:137
MemoryManager
Configurable memory manager.
Definition MemoryManager.hpp:40
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121