http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Charter
Release Info

Installation
Download
Build Instructions

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

Source Repository
User Mail Archive
Devel Mail Archive

API Docs for SAX and DOM
 

DOMException.hpp

Go to the documentation of this file.
00001 #ifndef DOMException_HEADER_GUARD_
00002 #define DOMException_HEADER_GUARD_
00003 
00004 /*
00005  * Copyright 2001-2002,2004 The Apache Software Foundation.
00006  * 
00007  * Licensed under the Apache License, Version 2.0 (the "License");
00008  * you may not use this file except in compliance with the License.
00009  * You may obtain a copy of the License at
00010  * 
00011  *      http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  */
00019 
00020 /*
00021  * $Id: DOMException.hpp 176026 2004-09-08 13:57:07Z peiyongz $
00022  */
00023 
00024 #include <xercesc/util/XercesDefs.hpp>
00025 #include <xercesc/util/PlatformUtils.hpp>
00026 
00027 XERCES_CPP_NAMESPACE_BEGIN
00028 
00029 
00049 class MemoryManager;
00050 
00051 class  DOMException  {
00052 public:
00053     // -----------------------------------------------------------------------
00054     //  Constructors
00055     // -----------------------------------------------------------------------
00062     DOMException();
00063 
00071     DOMException(      
00072                        short                 code
00073                , const XMLCh*                message
00074                ,       MemoryManager* const  memoryManager = XMLPlatformUtils::fgMemoryManager
00075                 );
00076 
00082     DOMException(const DOMException &other);
00083 
00085 
00086     // -----------------------------------------------------------------------
00087     //  Destructors
00088     // -----------------------------------------------------------------------
00095     virtual ~DOMException();
00097 
00098 public:
00099     // -----------------------------------------------------------------------
00100     //  Class Types
00101     // -----------------------------------------------------------------------
00178     enum ExceptionCode {
00179          INDEX_SIZE_ERR       = 1,
00180          DOMSTRING_SIZE_ERR   = 2,
00181          HIERARCHY_REQUEST_ERR = 3,
00182          WRONG_DOCUMENT_ERR   = 4,
00183          INVALID_CHARACTER_ERR = 5,
00184          NO_DATA_ALLOWED_ERR  = 6,
00185          NO_MODIFICATION_ALLOWED_ERR = 7,
00186          NOT_FOUND_ERR        = 8,
00187          NOT_SUPPORTED_ERR    = 9,
00188          INUSE_ATTRIBUTE_ERR  = 10,
00189          INVALID_STATE_ERR    = 11,
00190          SYNTAX_ERR     = 12,
00191          INVALID_MODIFICATION_ERR    = 13,
00192          NAMESPACE_ERR     = 14,
00193          INVALID_ACCESS_ERR   = 15,
00194          VALIDATION_ERR       = 16
00195         };
00197 
00198     // -----------------------------------------------------------------------
00199     //  Getter
00200     // -----------------------------------------------------------------------
00201     inline const XMLCh* getMessage()    const;
00202 
00203     // -----------------------------------------------------------------------
00204     //  Class Types
00205     // -----------------------------------------------------------------------
00212     ExceptionCode   code;
00213 
00220     const XMLCh *msg;
00222 
00223 protected:
00224 
00225     MemoryManager*  fMemoryManager;
00226 
00227 private:
00228 
00236     bool            fMsgOwned;
00237 
00238 private:
00239     // -----------------------------------------------------------------------
00240     // Unimplemented constructors and operators
00241     // -----------------------------------------------------------------------    
00242     DOMException & operator = (const DOMException &);
00243 };
00244 
00245 inline const XMLCh* DOMException::getMessage() const
00246 {
00247     return msg;
00248 }
00249 
00250 XERCES_CPP_NAMESPACE_END
00251 
00252 #endif
00253 


Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.