summaryrefslogtreecommitdiff
path: root/sax/inc/sax_error.hh
diff options
context:
space:
mode:
Diffstat (limited to 'sax/inc/sax_error.hh')
-rw-r--r--sax/inc/sax_error.hh36
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