Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:51

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  *
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  *
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 /*
0019  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMLSEXCEPTION_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMLSEXCEPTION_HPP
0024 
0025 #include <xercesc/dom/DOMException.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 
0030 /**
0031  * Parser or write operations may throw an LSException if the processing is stopped.
0032  * The processing can be stopped due to a <code>DOMError</code> with a severity of
0033  * DOMError::DOM_SEVERITY_FATAL_ERROR or a non recovered DOMError::DOM_SEVERITY_ERROR,
0034  * or if <code>DOMErrorHandler::handleError()</code> returned <code>false</code>.
0035  * <p><b>Note</b>: As suggested in the definition of the constants in the <code>DOMError</code>
0036  * interface, a DOM implementation may choose to continue after a fatal error, but the
0037  * resulting DOM tree is then implementation dependent.
0038  * <p>See also the <a href='http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/DOM3-LS.html'>
0039  * Document Object Model (DOM) Level 3 Load and Save Specification</a>.
0040  * @since DOM Level 3
0041  */
0042 
0043 class MemoryManager;
0044 
0045 class CDOM_EXPORT DOMLSException : public DOMException {
0046 public:
0047     // -----------------------------------------------------------------------
0048     //  Class Types
0049     // -----------------------------------------------------------------------
0050     /** @name Public Contants */
0051     //@{
0052     /**
0053      * ExceptionCode
0054      *
0055      * <p><code>PARSE_ERR:</code>
0056      * If an attempt was made to load a document, or an XML Fragment, using DOMLSParser
0057      * and the processing has been stopped.</p>
0058      *
0059      * <p><code>SERIALIZE_ERR:</code>
0060      * If an attempt was made to serialize a Node using LSSerializer and the processing
0061      * has been stopped.</p>
0062      *
0063      * @since DOM Level 3
0064      */
0065     enum LSExceptionCode {
0066          PARSE_ERR        = 81,
0067          SERIALIZE_ERR    = 82
0068         };
0069     //@}
0070 
0071     // -----------------------------------------------------------------------
0072     //  Constructors
0073     // -----------------------------------------------------------------------
0074     /** @name Constructors */
0075     //@{
0076     /**
0077       * Default constructor for DOMLSException.
0078       *
0079       */
0080     DOMLSException();
0081 
0082     /**
0083       * Constructor which takes an error code and a message.
0084       *
0085       * @param code           The error code which indicates the exception
0086       * @param messageCode    The string containing the error message
0087       * @param memoryManager  The memory manager used to (de)allocate memory
0088       */
0089     DOMLSException(short code,
0090                    short messageCode,
0091                    MemoryManager* const memoryManager);
0092 
0093     /**
0094       * Copy constructor.
0095       *
0096       * @param other The object to be copied.
0097       */
0098     DOMLSException(const DOMLSException &other);
0099 
0100     //@}
0101 
0102     // -----------------------------------------------------------------------
0103     //  Destructors
0104     // -----------------------------------------------------------------------
0105     /** @name Destructor. */
0106     //@{
0107      /**
0108       * Destructor for DOMLSException.
0109       *
0110       */
0111     virtual ~DOMLSException();
0112     //@}
0113 
0114 private:
0115     // -----------------------------------------------------------------------
0116     // Unimplemented constructors and operators
0117     // -----------------------------------------------------------------------
0118     DOMLSException & operator = (const DOMLSException &);
0119 };
0120 
0121 XERCES_CPP_NAMESPACE_END
0122 
0123 #endif