source: NonGTP/Xerces/xerces/include/xercesc/dom/DOMXPathException.hpp @ 358

Revision 358, 3.4 KB checked in by bittner, 19 years ago (diff)

xerces added

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