Skip to content

Commit

Permalink
need to demonstrate error cb not just drain cb
Browse files Browse the repository at this point in the history
need to demonstrate to users how to use a single error callback
  • Loading branch information
ORESoftware committed Jun 3, 2018
1 parent 7f05f5c commit eb3796a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/queue.js
Expand Up @@ -88,6 +88,11 @@ import wrapAsync from './internal/wrapAsync';
* console.log('all items have been processed');
* };
*
* // assign an error callback
* q.error = function(err, task) {
* console.error('task experienced an error');
* };
*
* // add some items to the queue
* q.push({name: 'foo'}, function(err) {
* console.log('finished processing foo');
Expand Down

0 comments on commit eb3796a

Please sign in to comment.