Skip to content

Commit 7effa21

Browse files
author
Ruben Bridgewater
committed
Improve documentation
1 parent a2255d7 commit 7effa21

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,15 @@ client.get("foo_rand000000000000", function (err, reply) {
296296

297297
## Error handling (>= v.2.6)
298298

299-
All redis errors are returned as `ReplyError`.
300-
All unresolved commands that get rejected due to what ever reason return a `AbortError`.
301-
As subclass of the `AbortError` a `AggregateError` exists. This is emitted in case multiple unresolved commands without callback got rejected in debug_mode.
302-
They are all aggregated and a single error is emitted in that case.
299+
Currently the following error subclasses exist:
300+
301+
* `RedisError`: _All errors_ returned by the client
302+
* `ReplyError` subclass of `RedisError`: All errors returned by __Redis__ itself
303+
* `AbortError` subclass of `RedisError`: All commands that could not finish due to what ever reason
304+
* `ParserError` subclass of `RedisError`: Returned in case of a parser error (this should not happen)
305+
* `AggregateError` subclass of `AbortError`: Emitted in case multiple unresolved commands without callback got rejected in debug_mode instead of lots of `AbortError`s.
306+
307+
All error classes are exported by the module.
303308

304309
Example:
305310
```js

0 commit comments

Comments
 (0)