1 | #ifndef DOMXPathException_HEADER_GUARD_ |
---|
2 | #define DOMXPathException_HEADER_GUARD_ |
---|
3 | |
---|
4 | /* |
---|
5 | * Licensed to the Apache Software Foundation (ASF) under one or more |
---|
6 | * contributor license agreements. See the NOTICE file distributed with |
---|
7 | * this work for additional information regarding copyright ownership. |
---|
8 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
9 | * (the "License"); you may not use this file except in compliance with |
---|
10 | * the License. You may obtain a copy of the License at |
---|
11 | * |
---|
12 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
13 | * |
---|
14 | * Unless required by applicable law or agreed to in writing, software |
---|
15 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
17 | * See the License for the specific language governing permissions and |
---|
18 | * limitations under the License. |
---|
19 | */ |
---|
20 | |
---|
21 | #include <xercesc/util/XercesDefs.hpp> |
---|
22 | |
---|
23 | XERCES_CPP_NAMESPACE_BEGIN |
---|
24 | |
---|
25 | /** |
---|
26 | * @since DOM Level 3 |
---|
27 | */ |
---|
28 | class CDOM_EXPORT DOMXPathException |
---|
29 | { |
---|
30 | public: |
---|
31 | // ----------------------------------------------------------------------- |
---|
32 | // Constructors |
---|
33 | // ----------------------------------------------------------------------- |
---|
34 | /** @name Constructors */ |
---|
35 | //@{ |
---|
36 | /** |
---|
37 | * Default constructor for DOMXPathException. |
---|
38 | * |
---|
39 | */ |
---|
40 | DOMXPathException(); |
---|
41 | |
---|
42 | /** |
---|
43 | * Constructor which takes an error code and a message. |
---|
44 | * |
---|
45 | * @param code The error code which indicates the exception |
---|
46 | * @param message The string containing the error message |
---|
47 | */ |
---|
48 | DOMXPathException(short code, const XMLCh *message); |
---|
49 | |
---|
50 | /** |
---|
51 | * Copy constructor. |
---|
52 | * |
---|
53 | * @param other The object to be copied. |
---|
54 | */ |
---|
55 | DOMXPathException(const DOMXPathException &other); |
---|
56 | |
---|
57 | //@} |
---|
58 | |
---|
59 | // ----------------------------------------------------------------------- |
---|
60 | // Destructors |
---|
61 | // ----------------------------------------------------------------------- |
---|
62 | /** @name Destructor. */ |
---|
63 | //@{ |
---|
64 | /** |
---|
65 | * Destructor for DOMXPathException. |
---|
66 | * |
---|
67 | */ |
---|
68 | virtual ~DOMXPathException(); |
---|
69 | //@} |
---|
70 | |
---|
71 | public: |
---|
72 | |
---|
73 | //@{ |
---|
74 | /** |
---|
75 | * ExceptionCode |
---|
76 | * INVALID_EXPRESSION_ERR If the expression has a syntax error or otherwise |
---|
77 | * is not a legal expression according to the rules of the specific |
---|
78 | * <code>XPathEvaluator</code> or contains specialized extension functions |
---|
79 | * or variables not supported by this implementation. |
---|
80 | * TYPE_ERR If the expression cannot be converted to return the specified type. |
---|
81 | */ |
---|
82 | enum ExceptionCode { |
---|
83 | INVALID_EXPRESSION_ERR = 51, |
---|
84 | TYPE_ERR = 52 |
---|
85 | }; |
---|
86 | //@} |
---|
87 | |
---|
88 | // ----------------------------------------------------------------------- |
---|
89 | // Class Types |
---|
90 | // ----------------------------------------------------------------------- |
---|
91 | /** @name Public variables */ |
---|
92 | //@{ |
---|
93 | /** |
---|
94 | * A code value, from the set defined by the ExceptionCode enum, |
---|
95 | * indicating the type of error that occured. |
---|
96 | */ |
---|
97 | ExceptionCode code; |
---|
98 | |
---|
99 | /** |
---|
100 | * A string value. Applications may use this field to hold an error |
---|
101 | * message. The field value is not set by the DOM implementation, |
---|
102 | * meaning that the string will be empty when an exception is first |
---|
103 | * thrown. |
---|
104 | */ |
---|
105 | const XMLCh *msg; |
---|
106 | //@} |
---|
107 | |
---|
108 | private: |
---|
109 | // ----------------------------------------------------------------------- |
---|
110 | // Unimplemented constructors and operators |
---|
111 | // ----------------------------------------------------------------------- |
---|
112 | DOMXPathException& operator = (const DOMXPathException&); |
---|
113 | }; |
---|
114 | |
---|
115 | XERCES_CPP_NAMESPACE_END |
---|
116 | |
---|
117 | #endif |
---|