Xerces-C++  3.1.2
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: DOMException.hpp 932887 2010-04-11 13:04:59Z borisk $
20  */
21 
22 #if !defined(XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP)
23 #define XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP
24 
27 
29 
30 
50 class MemoryManager;
51 
53 public:
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 
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:
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 
256 
257 #endif
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121
Definition: DOMException.hpp:52
const XMLCh * msg
A string value.
Definition: DOMException.hpp:226
short code
A code value, from the set defined by the ExceptionCode enum, indicating the type of error that occur...
Definition: DOMException.hpp:218
ExceptionCode
ExceptionCode.
Definition: DOMException.hpp:137
MemoryManager * fMemoryManager
Definition: DOMException.hpp:230
Configurable memory manager.
Definition: MemoryManager.hpp:39
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
const XMLCh * getMessage() const
Definition: DOMException.hpp:250