Permalink
Browse files

Merge pull request #1540 from ORESoftware/patch-1

need to demonstrate error cb not just drain cb
  • Loading branch information...
aearly committed Jun 3, 2018
2 parents 117ced4 + eb3796a commit 2a135a422f5da6ab6c8d242b2428828bb51eb1f8
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/queue.js
View
@@ -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');

0 comments on commit 2a135a4

Please sign in to comment.