summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/README.md b/README.md
index 41a3d4f..2cdb936 100644
--- a/README.md
+++ b/README.md
@@ -118,6 +118,17 @@ fastdom.clear(write);
fastdom.clear(defer);
```
+## Exceptions
+
+FastDom is async, this can therefore mean that when a job comes around to being executed, the node you were working with may no longer be there. These errors are usually not critical, but they can cripple your app. FastDom allows you to register an `onError` handler. If `fastdom.onError` has been registered, FastDom will catch any errors that occur in your jobs, and run the handler instead.
+
+```js
+fastdom.onError = function(error) {
+ // Do something if you want
+};
+
+```
+
## Tests
#### With PhantomJS