KHtml

dom_exception.h
1 /*
2  * This file is part of the DOM implementation for KDE.
3  *
4  * Copyright 1999 Lars Knoll ([email protected])
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public License
17  * along with this library; see the file COPYING.LIB. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * This file includes excerpts from the Document Object Model (DOM)
22  * Level 1 Specification (Recommendation)
23  * https://www.w3.org/TR/REC-DOM-Level-1/
24  * Copyright © World Wide Web Consortium , (Massachusetts Institute of
25  * Technology , Institut National de Recherche en Informatique et en
26  * Automatique , Keio University ). All Rights Reserved.
27  *
28  */
29 #ifndef _DOM_DOMException_h_
30 #define _DOM_DOMException_h_
31 
32 #include <dom/dom_misc.h>
33 #include <dom/dom_string.h>
34 
35 namespace DOM
36 {
37 
58 class KHTML_EXPORT DOMException
59 {
60 public:
61  DOMException(unsigned short _code)
62  {
63  code = _code;
64  }
65  DOMException(const DOMException &other)
66  {
67  code = other.code;
68  }
69 
70  DOMException &operator = (const DOMException &other)
71  {
72  code = other.code;
73  return *this;
74  }
75 
76  virtual ~DOMException() {}
82  INDEX_SIZE_ERR = 1,
83  DOMSTRING_SIZE_ERR = 2,
84  HIERARCHY_REQUEST_ERR = 3,
85  WRONG_DOCUMENT_ERR = 4,
86  INVALID_CHARACTER_ERR = 5,
87  NO_DATA_ALLOWED_ERR = 6,
88  NO_MODIFICATION_ALLOWED_ERR = 7,
89  NOT_FOUND_ERR = 8,
90  NOT_SUPPORTED_ERR = 9,
91  INUSE_ATTRIBUTE_ERR = 10,
92  INVALID_STATE_ERR = 11,
93  SYNTAX_ERR = 12,
94  INVALID_MODIFICATION_ERR = 13,
95  NAMESPACE_ERR = 14,
96  INVALID_ACCESS_ERR = 15,
97  VALIDATION_ERR = 16,
98  TYPE_MISMATCH_ERR = 17,
99  SECURITY_ERR = 18,
100  NETWORK_ERR = 19,
101  ABORT_ERR = 20,
102  URL_MISMATCH_ERR = 21,
103  QUOTA_EXCEEDED_ERR = 22,
104  TIMEOUT_ERR = 23,
105  NOT_READABLE_ERR = 24,
106  DATA_CLONE_ERR = 25,
107  ENCODING_ERR = 26
108  };
109  unsigned short code;
110 
112  DOMString codeAsString() const;
113 
115  static DOMString codeAsString(int code);
116 
118  static bool isDOMExceptionCode(int exceptioncode);
119 
120 };
121 
122 } //namespace
123 #endif
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:58
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
ExceptionCode
An integer indicating the type of error generated.
Definition: dom_exception.h:81
This library provides a full-featured HTML parser and widget.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 6 2020 22:45:20 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.