00001 /* 00002 * Licensed to the Apache Software Foundation (ASF) under one 00003 * or more contributor license agreements. See the NOTICE file 00004 * distributed with this work for additional information 00005 * regarding copyright ownership. The ASF licenses this file 00006 * to you under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 #if !defined(XALANDOMEXCEPTION_HEADER_GUARD_1357924680) 00019 #define XALANDOMEXCEPTION_HEADER_GUARD_1357924680 00020 00021 00022 00023 #include <xalanc/XalanDOM/XalanDOMDefinitions.hpp> 00024 00025 00026 00027 XALAN_CPP_NAMESPACE_BEGIN 00028 00029 00030 00031 /* 00032 * <meta name="usage" content="experimental"/> 00033 * 00034 * Base class for the DOM Exception interface. 00035 * 00036 * This class is experimental and subject to change!! 00037 */ 00038 00039 class XALAN_DOM_EXPORT XalanDOMException 00040 { 00041 public: 00042 00043 /** @name Enumerators for DOM Exceptions */ 00044 //@{ 00045 enum ExceptionCode 00046 { 00047 // These are the errors as defined in the W3C DOM recommendation. 00048 INDEX_SIZE_ERR = 1, 00049 DOMSTRING_SIZE_ERR = 2, 00050 HIERARCHY_REQUEST_ERR = 3, 00051 WRONG_DOCUMENT_ERR = 4, 00052 INVALID_CHARACTER_ERR = 5, 00053 NO_DATA_ALLOWED_ERR = 6, 00054 NO_MODIFICATION_ALLOWED_ERR = 7, 00055 NOT_FOUND_ERR = 8, 00056 NOT_SUPPORTED_ERR = 9, 00057 INUSE_ATTRIBUTE_ERR = 10, 00058 INVALID_STATE_ERR = 11, 00059 SYNTAX_ERR = 12, 00060 INVALID_MODIFICATION_ERR = 13, 00061 NAMESPACE_ERR = 14, 00062 INVALID_ACCESS_ERR = 15, 00063 00064 // This is the first available number, 00065 // according to the spec. 00066 UNKNOWN_ERR = 201, 00067 00068 // Indicates that an error occurred transcoding a 00069 // string. 00070 TRANSCODING_ERR = 202 00071 }; 00072 //@} 00073 00074 /** @name Constructors and assignment operator */ 00075 //@{ 00076 00077 /** 00078 * Constructor which takes an error code and a message. 00079 * 00080 * @param code The error code which indicates the exception 00081 */ 00082 explicit 00083 XalanDOMException(ExceptionCode code = UNKNOWN_ERR); 00084 00085 /** 00086 * Copy constructor. 00087 * 00088 * @param other The object to be copied. 00089 */ 00090 XalanDOMException(const XalanDOMException& theSource); 00091 00092 //@} 00093 /** @name Destructor. */ 00094 //@{ 00095 00096 /** 00097 * Destructor for XalanDOMException. 00098 */ 00099 virtual 00100 ~XalanDOMException(); 00101 //@} 00102 00103 /** @name Get functions. */ 00104 //@{ 00105 /** 00106 * Returns a code value, from the set defined by the ExceptionCode enum, 00107 * indicating the type of error that occurred. 00108 * @return The exception code. 00109 */ 00110 virtual ExceptionCode 00111 getExceptionCode() const; 00112 00113 private: 00114 00115 // Not implemented... 00116 XalanDOMException& 00117 operator=(const XalanDOMException&); 00118 00119 00120 // Data members... 00121 const ExceptionCode m_code; 00122 }; 00123 00124 00125 00126 XALAN_CPP_NAMESPACE_END 00127 00128 00129 00130 #endif // !defined(XALANDOMEXCEPTION_HEADER_GUARD_1357924680)
Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.
Xalan-C++ XSLT Processor Version 1.11 |
|