File: ErrorHandler.h

package info (click to toggle)
ace 6.0.3%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 49,368 kB
  • sloc: cpp: 341,826; perl: 30,850; ansic: 20,952; makefile: 10,144; sh: 4,744; python: 828; exp: 787; yacc: 511; xml: 330; lex: 158; lisp: 116; csh: 48; tcl: 5
file content (71 lines) | stat: -rw-r--r-- 2,116 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// -*- C++ -*-

//=============================================================================
/**
 *  @file    ErrorHandler.h
 *
 *  $Id: ErrorHandler.h 91257 2010-08-03 11:54:04Z johnnyw $
 *
 *  @author Nanbor Wang <nanbor@cs.wustl.edu>
 */
//=============================================================================
#ifndef _ACEXML_ERRORHANDLER_H_
#define _ACEXML_ERRORHANDLER_H_

#include /**/ "ace/pre.h"
#include "ACEXML/common/ACEXML_Export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
#pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ACEXML/common/SAXExceptions.h"

/**
 * @class ACEXML_ErrorHandler ErrorHandler.h "ACEXML/common/ErrorHandler.h"
 *
 * @brief ACEXML_ErrorHandler
 *
 * If a SAX application needs to implement customized error handling,
 * it must implement this interface and then register an instance with
 * the XML reader using the setErrorHandler method. The parser will
 * then report all errors and warnings through this interface.
 *
 * @b WARNING: If an application does not register an ErrorHandler,
 * XML parsing errors will go unreported and bizarre behaviour may
 * result.
 *
 * For XML processing errors, a SAX driver must use this interface
 * instead of throwing an exception: it is up to the application to
 * decide whether to throw an exception for different types of errors
 * and warnings. Note, however, that there is no requirement that the
 * parser continue to provide useful information after a call to
 * fatalError (in other words, a SAX driver class could catch an
 * exception and report a fatalError).
 */
class ACEXML_Export ACEXML_ErrorHandler
{
public:

  virtual ~ACEXML_ErrorHandler (void);

  /**
   * Receive notification of a recoverable error.
   */
  virtual void error (ACEXML_SAXParseException &exception) = 0;

  /**
   * Receive notification of a non-recoverable error.
   */
  virtual void fatalError (ACEXML_SAXParseException &exception) = 0;

  /**
   * Receive notification of a warning.
   */
  virtual void warning (ACEXML_SAXParseException &exception) = 0;
};


#include /**/ "ace/post.h"

#endif /* _ACEXML_ERRORHANDLER_H_ */