diff options
| author | Joel Klinghed <the_jk@spawned.biz> | 2023-06-13 10:07:16 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@spawned.biz> | 2023-06-13 10:07:16 +0200 |
| commit | fc4547b412e28164af1bf8981234c6af959ccc0b (patch) | |
| tree | 061253e7a4f6abaca282223b36d10f0bed8cad23 /sax/inc/sax_error.hh | |
WIP
Diffstat (limited to 'sax/inc/sax_error.hh')
| -rw-r--r-- | sax/inc/sax_error.hh | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/sax/inc/sax_error.hh b/sax/inc/sax_error.hh new file mode 100644 index 0000000..748f995 --- /dev/null +++ b/sax/inc/sax_error.hh @@ -0,0 +1,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 |
