Xalan-C++ API Reference  1.12.0
XalanDOMException.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XALANDOMEXCEPTION_HEADER_GUARD_1357924680)
19 #define XALANDOMEXCEPTION_HEADER_GUARD_1357924680
20 
21 
22 
24 
25 
26 
27 namespace XALAN_CPP_NAMESPACE {
28 
29 
30 
31 /*
32  * <meta name="usage" content="experimental"/>
33  *
34  * Base class for the DOM Exception interface.
35  *
36  * This class is experimental and subject to change!!
37  */
38 
40 {
41 public:
42 
43  /** @name Enumerators for DOM Exceptions */
44  //@{
46  {
47  // These are the errors as defined in the W3C DOM recommendation.
48  INDEX_SIZE_ERR = 1,
49  DOMSTRING_SIZE_ERR = 2,
50  HIERARCHY_REQUEST_ERR = 3,
51  WRONG_DOCUMENT_ERR = 4,
52  INVALID_CHARACTER_ERR = 5,
53  NO_DATA_ALLOWED_ERR = 6,
54  NO_MODIFICATION_ALLOWED_ERR = 7,
55  NOT_FOUND_ERR = 8,
56  NOT_SUPPORTED_ERR = 9,
57  INUSE_ATTRIBUTE_ERR = 10,
58  INVALID_STATE_ERR = 11,
59  SYNTAX_ERR = 12,
60  INVALID_MODIFICATION_ERR = 13,
61  NAMESPACE_ERR = 14,
62  INVALID_ACCESS_ERR = 15,
63 
64  // This is the first available number,
65  // according to the spec.
66  UNKNOWN_ERR = 201,
67 
68  // Indicates that an error occurred transcoding a
69  // string.
70  TRANSCODING_ERR = 202
71  };
72  //@}
73 
74  /** @name Constructors and assignment operator */
75  //@{
76 
77  /**
78  * Constructor which takes an error code and a message.
79  *
80  * @param code The error code which indicates the exception
81  */
82  explicit
83  XalanDOMException(ExceptionCode code = UNKNOWN_ERR);
84 
85  /**
86  * Copy constructor.
87  *
88  * @param other The object to be copied.
89  */
90  XalanDOMException(const XalanDOMException& theSource);
91 
92  //@}
93  /** @name Destructor. */
94  //@{
95 
96  /**
97  * Destructor for XalanDOMException.
98  */
99  virtual
101  //@}
102 
103  /** @name Get functions. */
104  //@{
105  /**
106  * Returns a code value, from the set defined by the ExceptionCode enum,
107  * indicating the type of error that occurred.
108  * @return The exception code.
109  */
110  virtual ExceptionCode
111  getExceptionCode() const;
112 
113 private:
114 
115  // Not implemented...
117  operator=(const XalanDOMException&);
118 
119 
120  // Data members...
121  const ExceptionCode m_code;
122 };
123 
124 
125 
126 }
127 
128 
129 
130 #endif // !defined(XALANDOMEXCEPTION_HEADER_GUARD_1357924680)
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanDOMException
Definition: XalanDOMException.hpp:39
xalanc::XalanDOMException::ExceptionCode
ExceptionCode
Definition: XalanDOMException.hpp:45
XalanDOMDefinitions.hpp
XALAN_DOM_EXPORT
#define XALAN_DOM_EXPORT
Definition: XalanDOMDefinitions.hpp:37