• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • khtml
  • dom
dom3_xpath.cpp
Go to the documentation of this file.
1 /*
2  * XPathExceptionImpl.cpp - Copyright 2005 Frerich Raabe <raabe@kde.org>
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * 1. Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  * notice, this list of conditions and the following disclaimer in the
12  * documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24  */
25 #include "dom3_xpath.h"
26 
27 using namespace DOM;
28 
29 DOMString XPathException::codeAsString(int code) {
30  switch ( code ) {
31  case INVALID_EXPRESSION_ERR:
32  return DOMString( "INVALID_EXPRESSION_ERR" );
33  case TYPE_ERR:
34  return DOMString( "TYPE_ERR" );
35  }
36  return DOMString( "(unknown exception code)" );
37 }
38 
39 DOMString XPathException::codeAsString() const
40 {
41  return codeAsString(code);
42 }
43 
44 int XPathException::toCode( int xpathCode )
45 {
46  return xpathCode + _EXCEPTION_OFFSET;
47 }
48 
49 bool XPathException::isXPathExceptionCode(int exceptioncode)
50 {
51  return exceptioncode >= _EXCEPTION_OFFSET && exceptioncode < _EXCEPTION_MAX;
52 }
53 
54 // kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
DOM::XPathException::codeAsString
DOMString codeAsString() const
Definition: dom3_xpath.cpp:39
DOM::XPathException::toCode
static int toCode(int xpathCode)
Definition: dom3_xpath.cpp:44
DOM::XPathException::TYPE_ERR
Definition: dom3_xpath.h:91
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::XPathException::code
unsigned short code
An integer indicating the type of error generated, as given by DOM L3 XPath.
Definition: dom3_xpath.h:86
DOM::XPathException::_EXCEPTION_OFFSET
Definition: dom3_xpath.h:93
DOM::XPathException::INVALID_EXPRESSION_ERR
Definition: dom3_xpath.h:90
dom3_xpath.h
DOM::XPathException::isXPathExceptionCode
static bool isXPathExceptionCode(int exceptioncode)
Definition: dom3_xpath.cpp:49
DOM::XPathException::_EXCEPTION_MAX
Definition: dom3_xpath.h:94
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

Skip menu "KHTML"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal