Cleanup ACE_HAS_PTHREAD_SIGMASK_PROTOTYPE, all platforms support it so far as I can...
[ACE_TAO.git] / ACE / ACEXML / common / ErrorHandler.h
blob1d10779bfca1016254f4ddd0ec484e5d90fa77fc
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file ErrorHandler.h
7 * @author Nanbor Wang <nanbor@cs.wustl.edu>
8 */
9 //=============================================================================
10 #ifndef _ACEXML_ERRORHANDLER_H_
11 #define _ACEXML_ERRORHANDLER_H_
13 #include /**/ "ace/pre.h"
14 #include "ACEXML/common/ACEXML_Export.h"
16 #if !defined (ACE_LACKS_PRAGMA_ONCE)
17 #pragma once
18 #endif /* ACE_LACKS_PRAGMA_ONCE */
20 #include "ACEXML/common/SAXExceptions.h"
22 /**
23 * @class ACEXML_ErrorHandler
25 * @brief ACEXML_ErrorHandler
27 * If a SAX application needs to implement customized error handling,
28 * it must implement this interface and then register an instance with
29 * the XML reader using the setErrorHandler method. The parser will
30 * then report all errors and warnings through this interface.
32 * @b WARNING: If an application does not register an ErrorHandler,
33 * XML parsing errors will go unreported and bizarre behaviour may
34 * result.
36 * For XML processing errors, a SAX driver must use this interface
37 * instead of throwing an exception: it is up to the application to
38 * decide whether to throw an exception for different types of errors
39 * and warnings. Note, however, that there is no requirement that the
40 * parser continue to provide useful information after a call to
41 * fatalError (in other words, a SAX driver class could catch an
42 * exception and report a fatalError).
44 class ACEXML_Export ACEXML_ErrorHandler
46 public:
47 virtual ~ACEXML_ErrorHandler ();
49 /**
50 * Receive notification of a recoverable error.
52 virtual void error (ACEXML_SAXParseException &exception) = 0;
54 /**
55 * Receive notification of a non-recoverable error.
57 virtual void fatalError (ACEXML_SAXParseException &exception) = 0;
59 /**
60 * Receive notification of a warning.
62 virtual void warning (ACEXML_SAXParseException &exception) = 0;
66 #include /**/ "ace/post.h"
68 #endif /* _ACEXML_ERRORHANDLER_H_ */