summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/Architecture15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/Architecture b/docs/Architecture
index 90d8688..23c820a 100644
--- a/docs/Architecture
+++ b/docs/Architecture
@@ -54,3 +54,18 @@ Parse errors
Notification of parse errors is made through a dedicated event. This event
contains the line/column offset of the error location, along with a message
detailing the error.
+
+Exceptional circumstances
+-------------------------
+
+ Exceptional circumstances (such as memory exhaustion) are reported
+ immediately.
+
+ The parser's state in such situations is undefined. There is no recovery
+ mechanism.
+
+ Therefore, if the client is able to recover from the exceptional
+ circumstance (e.g. by making more free memory available) the only valid
+ way to proceed is to create a new parser instance and start parsing from
+ scratch. The client should ensure that they destroy the old parser instance
+ and any DOM tree produced by it, to avoid resource leaks.