Skip to content

Commit

Permalink
doc: add docs for AssertionError
Browse files Browse the repository at this point in the history
  • Loading branch information
Mandeep Singh committed Jul 16, 2017
1 parent 5d3609d commit d4c6b23
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 parameters.

For example:

```js
assert.equal(1, 2);
// AssertionError [ERR_ASSERTION]: 1 == 2
```

## Class: RangeError

A subclass of `Error` that indicates that a provided argument was not within the
Expand Down

0 comments on commit d4c6b23

Please sign in to comment.