source: icXML/icXML-devel/src/xercesc/dom/impl/DOMErrorImpl.cpp @ 2777

Last change on this file since 2777 was 2777, checked in by cameron, 7 years ago

Set up to use xercesc/icxercesc root-relative paths for all includes

File size: 2.5 KB
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18/*
19 * $Id: DOMErrorImpl.cpp 671894 2008-06-26 13:29:21Z borisk $
20 */
21
22#include <xercesc/dom/impl/DOMErrorImpl.hpp>
23#include <xercesc/dom/DOMException.hpp>
24#include <xercesc/dom/DOMLocator.hpp>
25
26XERCES_CPP_NAMESPACE_BEGIN
27
28
29// ---------------------------------------------------------------------------
30//  DOMErrorImpl: Constructors and Destructor
31// ---------------------------------------------------------------------------
32DOMErrorImpl::DOMErrorImpl(const ErrorSeverity severity) :
33fAdoptLocation(false)
34, fSeverity(severity)
35, fMessage(0)
36, fLocation(0)
37, fType(0)
38, fRelatedData(0)
39{
40}
41
42DOMErrorImpl::DOMErrorImpl(const ErrorSeverity severity,
43                           const XMLCh* const message,
44                           DOMLocator* const location) :
45fAdoptLocation(false)
46, fSeverity(severity)
47, fMessage(message)
48, fLocation(location)
49, fType(0)
50, fRelatedData(0)
51{
52}
53
54DOMErrorImpl::DOMErrorImpl(const ErrorSeverity severity,
55                           const XMLCh* type,
56                           const XMLCh* message,
57                           void* relatedData) :
58fAdoptLocation(false)
59, fSeverity(severity)
60, fMessage(message)
61, fLocation(0)
62, fType(type)
63, fRelatedData(relatedData)
64{
65
66}
67
68DOMErrorImpl::~DOMErrorImpl()
69{
70    if (fAdoptLocation)
71        delete fLocation;
72}
73
74// ---------------------------------------------------------------------------
75//  DOMErrorImpl: Setter methods
76// ---------------------------------------------------------------------------
77void DOMErrorImpl::setLocation(DOMLocator* const location)
78{
79    if (fAdoptLocation)
80        delete fLocation;
81
82    fLocation = location;
83}
84
85void DOMErrorImpl::setRelatedException(void*) const
86{
87    throw DOMException(DOMException::NOT_SUPPORTED_ERR, 0);
88}
89
90XERCES_CPP_NAMESPACE_END
Note: See TracBrowser for help on using the repository browser.