DOMException.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP)
#define XERCESC_INCLUDE_GUARD_DOMEXCEPTION_HPP
#include <xercesc/util/XercesDefs.hpp>
#include <xercesc/util/PlatformUtils.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class MemoryManager;
class CDOM_EXPORT DOMException {
public:
// -----------------------------------------------------------------------
// Class Types
// -----------------------------------------------------------------------
enum ExceptionCode {
INDEX_SIZE_ERR = 1,
DOMSTRING_SIZE_ERR = 2,
HIERARCHY_REQUEST_ERR = 3,
WRONG_DOCUMENT_ERR = 4,
INVALID_CHARACTER_ERR = 5,
NO_DATA_ALLOWED_ERR = 6,
NO_MODIFICATION_ALLOWED_ERR = 7,
NOT_FOUND_ERR = 8,
NOT_SUPPORTED_ERR = 9,
INUSE_ATTRIBUTE_ERR = 10,
INVALID_STATE_ERR = 11,
SYNTAX_ERR = 12,
INVALID_MODIFICATION_ERR = 13,
NAMESPACE_ERR = 14,
INVALID_ACCESS_ERR = 15,
VALIDATION_ERR = 16,
TYPE_MISMATCH_ERR = 17
};
public:
// -----------------------------------------------------------------------
// Constructors
// -----------------------------------------------------------------------
DOMException();
DOMException(short code,
short messageCode = 0,
MemoryManager* const memoryManager = XMLPlatformUtils::fgMemoryManager);
DOMException(const DOMException &other);
// -----------------------------------------------------------------------
// Destructors
// -----------------------------------------------------------------------
virtual ~DOMException();
public:
// -----------------------------------------------------------------------
// Getter
// -----------------------------------------------------------------------
inline const XMLCh* getMessage() const;
// -----------------------------------------------------------------------
// Class Types
// -----------------------------------------------------------------------
short code;
const XMLCh *msg;
protected:
MemoryManager* fMemoryManager;
private:
bool fMsgOwned;
private:
// -----------------------------------------------------------------------
// Unimplemented constructors and operators
// -----------------------------------------------------------------------
DOMException & operator = (const DOMException &);
};
inline const XMLCh* DOMException::getMessage() const
{
return msg;
}
XERCES_CPP_NAMESPACE_END
#endif
PlatformUtils.hpp
XercesDefs.hpp
CDOM_EXPORT
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMLCh
char16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
DOMException
Definition: DOMException.hpp:52
DOMException::DOMException
DOMException()
Default constructor for DOMException.
DOMException::msg
const XMLCh * msg
A string value.
Definition: DOMException.hpp:226
DOMException::DOMException
DOMException(short code, short messageCode=0, MemoryManager *const memoryManager=XMLPlatformUtils::fgMemoryManager)
Constructor which takes an error code and an optional message code.
DOMException::fMemoryManager
MemoryManager * fMemoryManager
Definition: DOMException.hpp:230
DOMException::DOMException
DOMException(const DOMException &other)
Copy constructor.
DOMException::~DOMException
virtual ~DOMException()
Destructor for DOMException.
DOMException::code
short code
A code value, from the set defined by the ExceptionCode enum, indicating the type of error that occur...
Definition: DOMException.hpp:218
DOMException::getMessage
const XMLCh * getMessage() const
Definition: DOMException.hpp:250
DOMException::ExceptionCode
ExceptionCode
ExceptionCode.
Definition: DOMException.hpp:137
MemoryManager
Configurable memory manager.
Definition: MemoryManager.hpp:40
XMLPlatformUtils::fgMemoryManager
static MemoryManager * fgMemoryManager
The configurable memory manager.
Definition: PlatformUtils.hpp:121