Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ErrorHandler.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ErrorHandler.h
00006  *
00007  *  $Id: ErrorHandler.h,v 1.1.1.1 2003/02/21 18:36:32 chad Exp $
00008  *
00009  *  @author Nanbor Wang <nanbor@cs.wustl.edu>
00010  */
00011 //=============================================================================
00012 #ifndef _ACEXML_ERRORHANDLER_H_
00013 #define _ACEXML_ERRORHANDLER_H_
00014 
00015 #include "ace/pre.h"
00016 #include "ACEXML/common/ACEXML_Export.h"
00017 
00018 #if !defined (ACE_LACKS_PRAGMA_ONCE)
00019 #pragma once
00020 #endif /* ACE_LACKS_PRAGMA_ONCE */
00021 
00022 #include "ACEXML/common/Env.h"
00023 #include "ACEXML/common/SAXExceptions.h"
00024 
00025 /**
00026  * @class ACEXML_ErrorHandler ErrorHandler.h "ACEXML/common/ErrorHandler.h"
00027  *
00028  * @brief ACEXML_ErrorHandler
00029  *
00030  * If a SAX application needs to implement customized error handling,
00031  * it must implement this interface and then register an instance with
00032  * the XML reader using the setErrorHandler method. The parser will
00033  * then report all errors and warnings through this interface.
00034  *
00035  * @b WARNING: If an application does not register an ErrorHandler,
00036  * XML parsing errors will go unreported and bizarre behaviour may
00037  * result.
00038  *
00039  * For XML processing errors, a SAX driver must use this interface
00040  * instead of throwing an exception: it is up to the application to
00041  * decide whether to throw an exception for different types of errors
00042  * and warnings. Note, however, that there is no requirement that the
00043  * parser continue to provide useful information after a call to
00044  * fatalError (in other words, a SAX driver class could catch an
00045  * exception and report a fatalError).
00046  */
00047 class ACEXML_Export ACEXML_ErrorHandler
00048 {
00049 public:
00050   /**
00051    * Receive notification of a recoverable error.
00052    */
00053   virtual void error (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00054         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00055 
00056   /**
00057    * Receive notification of a non-recoverable error.
00058    */
00059   virtual void fatalError (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00060         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00061 
00062   /**
00063    * Receive notification of a warning.
00064    */
00065   virtual void warning (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00066         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00067 };
00068 
00069 
00070 #include "ace/post.h"
00071 
00072 #endif /* _ACEXML_ERRORHANDLER_H_ */

Generated on Mon Jun 16 13:23:21 2003 for ACEXML by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002