Xerces-C++ 3.2.4

DOMError.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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_DOMERROR_HPP)
23#define XERCESC_INCLUDE_GUARD_DOMERROR_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26
27 XERCES_CPP_NAMESPACE_BEGIN
28
29 class DOMLocator;
30
31
39 class CDOM_EXPORT DOMError
40{
41 protected:
42 // -----------------------------------------------------------------------
43 // Hidden constructors
44 // -----------------------------------------------------------------------
47 DOMError() {};
49
50 private:
51 // -----------------------------------------------------------------------
52 // Unimplemented constructors and operators
53 // -----------------------------------------------------------------------
56 DOMError(const DOMError &);
57 DOMError & operator = (const DOMError &);
59
60 public:
61 // -----------------------------------------------------------------------
62 // All constructors are hidden, just the destructor is available
63 // -----------------------------------------------------------------------
70 virtual ~DOMError() {};
72
73 // -----------------------------------------------------------------------
74 // Class types
75 // -----------------------------------------------------------------------
99 enum ErrorSeverity
100 {
101 DOM_SEVERITY_WARNING = 1,
102 DOM_SEVERITY_ERROR = 2,
103 DOM_SEVERITY_FATAL_ERROR = 3
104 };
106
107
108 // -----------------------------------------------------------------------
109 // Virtual DOMError interface
110 // -----------------------------------------------------------------------
113 // -----------------------------------------------------------------------
114 // Getter methods
115 // -----------------------------------------------------------------------
122 virtual ErrorSeverity getSeverity() const = 0;
123
129 virtual const XMLCh* getMessage() const = 0;
130
136 virtual DOMLocator* getLocation() const = 0;
137
143 virtual void* getRelatedException() const = 0;
144
159 virtual const XMLCh* getType() const = 0;
160
166 virtual void* getRelatedData() const = 0;
168
169};
170
171 XERCES_CPP_NAMESPACE_END
172
173#endif
XercesDefs.hpp
CDOM_EXPORT
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
DOMError
DOMError is an interface that describes an error.
Definition: DOMError.hpp:40
DOMError::getRelatedException
virtual void * getRelatedException() const =0
The related platform dependent exception if any.
DOMError::getLocation
virtual DOMLocator * getLocation() const =0
Get the location of the error.
DOMError::~DOMError
virtual ~DOMError()
Destructor.
Definition: DOMError.hpp:70
DOMError::getType
virtual const XMLCh * getType() const =0
A XMLCh* indicating which related data is expected in relatedData.
DOMError::getSeverity
virtual ErrorSeverity getSeverity() const =0
Get the severity of the error.
DOMError::getRelatedData
virtual void * getRelatedData() const =0
The related DOMError::getType dependent data if any.
DOMError::ErrorSeverity
ErrorSeverity
The severity of the error described by the DOMError.
Definition: DOMError.hpp:100
DOMError::DOMError
DOMError()
Definition: DOMError.hpp:47
DOMError::getMessage
virtual const XMLCh * getMessage() const =0
Get the message describing the error that occured.
DOMLocator
DOMLocator is an interface that describes a location.
Definition: DOMLocator.hpp:42