KHTML
dom_exception.h
Go to the documentation of this file.
00001 /* 00002 * This file is part of the DOM implementation for KDE. 00003 * 00004 * Copyright 1999 Lars Knoll (knoll@kde.org) 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Library General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Library General Public License 00017 * along with this library; see the file COPYING.LIB. If not, write to 00018 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 * Boston, MA 02110-1301, USA. 00020 * 00021 * This file includes excerpts from the Document Object Model (DOM) 00022 * Level 1 Specification (Recommendation) 00023 * http://www.w3.org/TR/REC-DOM-Level-1/ 00024 * Copyright © World Wide Web Consortium , (Massachusetts Institute of 00025 * Technology , Institut National de Recherche en Informatique et en 00026 * Automatique , Keio University ). All Rights Reserved. 00027 * 00028 */ 00029 #ifndef _DOM_DOMException_h_ 00030 #define _DOM_DOMException_h_ 00031 00032 #include <dom/dom_misc.h> 00033 #include <dom/dom_string.h> 00034 00035 namespace DOM { 00036 00037 00058 class KHTML_EXPORT DOMException 00059 { 00060 public: 00061 DOMException(unsigned short _code) { code = _code; } 00062 DOMException(const DOMException &other) { code = other.code; } 00063 00064 DOMException & operator = (const DOMException &other) 00065 { code = other.code; return *this; } 00066 00067 virtual ~DOMException() {} 00072 enum ExceptionCode { 00073 INDEX_SIZE_ERR = 1, 00074 DOMSTRING_SIZE_ERR = 2, 00075 HIERARCHY_REQUEST_ERR = 3, 00076 WRONG_DOCUMENT_ERR = 4, 00077 INVALID_CHARACTER_ERR = 5, 00078 NO_DATA_ALLOWED_ERR = 6, 00079 NO_MODIFICATION_ALLOWED_ERR = 7, 00080 NOT_FOUND_ERR = 8, 00081 NOT_SUPPORTED_ERR = 9, 00082 INUSE_ATTRIBUTE_ERR = 10, 00083 INVALID_STATE_ERR = 11, 00084 SYNTAX_ERR = 12, 00085 INVALID_MODIFICATION_ERR = 13, 00086 NAMESPACE_ERR = 14, 00087 INVALID_ACCESS_ERR = 15, 00088 VALIDATION_ERR = 16, 00089 TYPE_MISMATCH_ERR = 17, 00090 SECURITY_ERR = 18, 00091 NETWORK_ERR = 19, 00092 ABORT_ERR = 20, 00093 URL_MISMATCH_ERR = 21, 00094 QUOTA_EXCEEDED_ERR = 22, 00095 TIMEOUT_ERR = 23, 00096 NOT_READABLE_ERR = 24, 00097 DATA_CLONE_ERR = 25, 00098 ENCODING_ERR = 26 00099 }; 00100 unsigned short code; 00101 00103 DOMString codeAsString() const; 00104 00106 static DOMString codeAsString(int code); 00107 00109 static bool isDOMExceptionCode(int exceptioncode); 00110 00111 }; 00112 00113 } //namespace 00114 #endif
KDE 4.6 API Reference