SourceForge.net Logo
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>
27
28XERCES_CPP_NAMESPACE_BEGIN
29
30
49
50class MemoryManager;
51
52class CDOM_EXPORT DOMException {
53public:
54 // -----------------------------------------------------------------------
55 // Class Types
56 // -----------------------------------------------------------------------
59
156
157
158public:
159 // -----------------------------------------------------------------------
160 // Constructors
161 // -----------------------------------------------------------------------
164
169
178 short messageCode = 0,
179 MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager);
180
187
189
190 // -----------------------------------------------------------------------
191 // Destructors
192 // -----------------------------------------------------------------------
195
199 virtual ~DOMException();
201
202
203public:
204 // -----------------------------------------------------------------------
205 // Getter
206 // -----------------------------------------------------------------------
207 inline const XMLCh* getMessage() const;
208
209 // -----------------------------------------------------------------------
210 // Class Types
211 // -----------------------------------------------------------------------
214
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
255XERCES_CPP_NAMESPACE_END
256
257#endif
DOMException()
Default constructor for DOMException.
DOMException(const DOMException &other)
Copy constructor.
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
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 * msg
A string value.
Definition DOMException.hpp:226
virtual ~DOMException()
Destructor for DOMException.
ExceptionCode
ExceptionCode.
Definition DOMException.hpp:137
@ NOT_SUPPORTED_ERR
Definition DOMException.hpp:146
@ DOMSTRING_SIZE_ERR
Definition DOMException.hpp:139
@ INVALID_CHARACTER_ERR
Definition DOMException.hpp:142
@ INDEX_SIZE_ERR
Definition DOMException.hpp:138
@ INVALID_STATE_ERR
Definition DOMException.hpp:148
@ NOT_FOUND_ERR
Definition DOMException.hpp:145
@ SYNTAX_ERR
Definition DOMException.hpp:149
@ NO_DATA_ALLOWED_ERR
Definition DOMException.hpp:143
@ TYPE_MISMATCH_ERR
Definition DOMException.hpp:154
@ WRONG_DOCUMENT_ERR
Definition DOMException.hpp:141
@ HIERARCHY_REQUEST_ERR
Definition DOMException.hpp:140
@ INUSE_ATTRIBUTE_ERR
Definition DOMException.hpp:147
@ INVALID_ACCESS_ERR
Definition DOMException.hpp:152
@ INVALID_MODIFICATION_ERR
Definition DOMException.hpp:150
@ NO_MODIFICATION_ALLOWED_ERR
Definition DOMException.hpp:144
@ VALIDATION_ERR
Definition DOMException.hpp:153
@ NAMESPACE_ERR
Definition DOMException.hpp:151
const XMLCh * getMessage() const
Definition DOMException.hpp:250
Configurable memory manager.
Definition MemoryManager.hpp:40
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition PlatformUtils.hpp:121