ErrorHandler.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 
00003 //=============================================================================
00004 /**
00005  *  @file    ErrorHandler.h
00006  *
00007  *  ErrorHandler.h,v 1.7 2005/04/20 16:22:53 ossama 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   virtual ~ACEXML_ErrorHandler (void);
00052 
00053   /**
00054    * Receive notification of a recoverable error.
00055    */
00056   virtual void error (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00057         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00058 
00059   /**
00060    * Receive notification of a non-recoverable error.
00061    */
00062   virtual void fatalError (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00063         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00064 
00065   /**
00066    * Receive notification of a warning.
00067    */
00068   virtual void warning (ACEXML_SAXParseException &exception ACEXML_ENV_ARG_DECL)
00069         ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
00070 };
00071 
00072 
00073 #include /**/ "ace/post.h"
00074 
00075 #endif /* _ACEXML_ERRORHANDLER_H_ */

Generated on Thu Nov 9 11:45:36 2006 for ACEXML by doxygen 1.3.6