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