summaryrefslogtreecommitdiff
path: root/sax/inc/sax_error.hh
blob: 748f995f434a44885a33cd53bb0d743c999bdd2f (plain)
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
#ifndef MODXML_SAX_ERROR_HH
#define MODXML_SAX_ERROR_HH

namespace modxml {
namespace sax {

enum class Error {
  /**
   * The XML spec has a list of characters that are never allowed in a document.
   */
  INVALID_CHAR,
  /**
   * If the document encoding is unsupported or unkown.
   */
  UNKNOWN_ENCODING,
  /**
   * If the document is incomplete. The is one of the few recoverable errors,
   * if you call the processor with more data it will continue.
   */
  INCOMPLETE,
  /**
   * A entity in the document exeeded max buffer size (either set by
   * ProcessBuilder or the default 10 MiB).
   */
  MAX_MEMORY_EXCEEDED,
  /**
   * A memory allocation failed. Note that this doesn't protect against
   * usage of overallocated memory.
   */
  OUT_OF_MEMORY,
};

}  // namespace sax
}  // namespace modxml

#endif  // MODXML_SAX_ERROR_HH