aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorMandeep Singh <mandeep.singh@zomato.com>2017-07-16 11:32:04 +0530
committerXadillaX <admin@xcoder.in>2017-08-10 21:04:45 +0800
commit4796fbc7d820240dde544b89755285e3af5bcf6c (patch)
tree782b355f85d38b41cfe4305f9a92a8ac60826756 /doc
parent472a66517a2a34fdce77cd0f6f29a2e62e7fd5d9 (diff)
downloadandroid-node-v8-4796fbc7d820240dde544b89755285e3af5bcf6c.tar.gz
android-node-v8-4796fbc7d820240dde544b89755285e3af5bcf6c.tar.bz2
android-node-v8-4796fbc7d820240dde544b89755285e3af5bcf6c.zip
doc: add docs for AssertionError
Fixes: https://github.com/nodejs/node/issues/12274 PR-URL: https://github.com/nodejs/node/pull/14261 Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
Diffstat (limited to 'doc')
-rw-r--r--doc/api/errors.md12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/api/errors.md b/doc/api/errors.md
index 56e3b6917c..b1e051e5c8 100644
--- a/doc/api/errors.md
+++ b/doc/api/errors.md
@@ -358,6 +358,18 @@ loop tick.
System-level errors are generated as augmented `Error` instances, which are
detailed [here](#errors_system_errors).
+## Class: AssertionError
+
+A subclass of `Error` that indicates the failure of an assertion. Such errors
+commonly indicate inequality of actual and expected value.
+
+For example:
+
+```js
+assert.strictEqual(1, 2);
+// AssertionError [ERR_ASSERTION]: 1 === 2
+```
+
## Class: RangeError
A subclass of `Error` that indicates that a provided argument was not within the