|
||||
File indexing completed on 2025-01-30 10:27:03
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMERROR_HPP) 0023 #define XERCESC_INCLUDE_GUARD_DOMERROR_HPP 0024 0025 #include <xercesc/util/XercesDefs.hpp> 0026 0027 XERCES_CPP_NAMESPACE_BEGIN 0028 0029 class DOMLocator; 0030 0031 0032 /** 0033 * DOMError is an interface that describes an error. 0034 * 0035 * @see DOMErrorHandler#handleError 0036 * @since DOM Level 3 0037 */ 0038 0039 class CDOM_EXPORT DOMError 0040 { 0041 protected: 0042 // ----------------------------------------------------------------------- 0043 // Hidden constructors 0044 // ----------------------------------------------------------------------- 0045 /** @name Hidden constructors */ 0046 //@{ 0047 DOMError() {}; 0048 //@} 0049 0050 private: 0051 // ----------------------------------------------------------------------- 0052 // Unimplemented constructors and operators 0053 // ----------------------------------------------------------------------- 0054 /** @name Unimplemented constructors and operators */ 0055 //@{ 0056 DOMError(const DOMError &); 0057 DOMError & operator = (const DOMError &); 0058 //@} 0059 0060 public: 0061 // ----------------------------------------------------------------------- 0062 // All constructors are hidden, just the destructor is available 0063 // ----------------------------------------------------------------------- 0064 /** @name Destructor */ 0065 //@{ 0066 /** 0067 * Destructor 0068 * 0069 */ 0070 virtual ~DOMError() {}; 0071 //@} 0072 0073 // ----------------------------------------------------------------------- 0074 // Class types 0075 // ----------------------------------------------------------------------- 0076 /** @name Public constants */ 0077 //@{ 0078 /** 0079 * The severity of the error described by the <code>DOMError</code>. 0080 * 0081 * <p><code>DOM_SEVERITY_ERROR:</code> 0082 * The severity of the error described by the <code>DOMError</code> is error. 0083 * A DOM_SEVERITY_ERROR may not cause the processing to stop if the error can 0084 * be recovered, unless <code>DOMErrorHandler::handleError()</code> returns false.</p> 0085 * 0086 * <p><code>DOM_SEVERITY_FATAL_ERROR</code> 0087 * The severity of the error described by the <code>DOMError</code> is fatal error. 0088 * A DOM_SEVERITY_FATAL_ERROR will cause the normal processing to stop. The return 0089 * value of <code>DOMErrorHandler::handleError()</code> is ignored unless the 0090 * implementation chooses to continue, in which case the behavior becomes undefined.</p> 0091 * 0092 * <p><code>DOM_SEVERITY_WARNING</code> 0093 * The severity of the error described by the <code>DOMError</code> is warning. 0094 * A DOM_SEVERITY_WARNING will not cause the processing to stop, unless 0095 * <code>DOMErrorHandler::handleError()</code> returns false.</p> 0096 * 0097 * @since DOM Level 3 0098 */ 0099 enum ErrorSeverity 0100 { 0101 DOM_SEVERITY_WARNING = 1, 0102 DOM_SEVERITY_ERROR = 2, 0103 DOM_SEVERITY_FATAL_ERROR = 3 0104 }; 0105 //@} 0106 0107 0108 // ----------------------------------------------------------------------- 0109 // Virtual DOMError interface 0110 // ----------------------------------------------------------------------- 0111 /** @name Functions introduced in DOM Level 3 */ 0112 //@{ 0113 // ----------------------------------------------------------------------- 0114 // Getter methods 0115 // ----------------------------------------------------------------------- 0116 /** 0117 * Get the severity of the error 0118 * 0119 * @see setSeverity 0120 * @since DOM Level 3 0121 */ 0122 virtual ErrorSeverity getSeverity() const = 0; 0123 0124 /** 0125 * Get the message describing the error that occured. 0126 * 0127 * @since DOM Level 3 0128 */ 0129 virtual const XMLCh* getMessage() const = 0; 0130 0131 /** 0132 * Get the location of the error 0133 * 0134 * @since DOM Level 3 0135 */ 0136 virtual DOMLocator* getLocation() const = 0; 0137 0138 /** 0139 * The related platform dependent exception if any. 0140 * 0141 * @since DOM Level 3 0142 */ 0143 virtual void* getRelatedException() const = 0; 0144 0145 /** 0146 * A <code>XMLCh*</code> indicating which related data is expected in 0147 * relatedData. Users should refer to the specification of the error 0148 * in order to find its <code>XMLCh*</code> type and relatedData 0149 * definitions if any. 0150 * 0151 * Note: As an example, <code>DOMDocument::normalizeDocument()</code> does generate 0152 * warnings when the "split-cdata-sections" parameter is in use. Therefore, the 0153 * method generates a DOM_SEVERITY_WARNING with type "cdata-sections-splitted" 0154 * and the first <code>DOMCDATASection</code> node in document order resulting from the split 0155 * is returned by the relatedData attribute. 0156 * 0157 * @since DOM Level 3 0158 */ 0159 virtual const XMLCh* getType() const = 0; 0160 0161 /** 0162 * The related DOMError::getType dependent data if any. 0163 * 0164 * @since DOM Level 3 0165 */ 0166 virtual void* getRelatedData() const = 0; 0167 //@} 0168 0169 }; 0170 0171 XERCES_CPP_NAMESPACE_END 0172 0173 #endif
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |