summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Early <alexander.early@gmail.com>2018-06-03 15:37:39 -0700
committerGitHub <noreply@github.com>2018-06-03 15:37:39 -0700
commit2a135a422f5da6ab6c8d242b2428828bb51eb1f8 (patch)
treeceb94f74052d20678cab736b55cd0773007b8d53
parent117ced4e4d5469a25d63e1ba9c0dd689a7477592 (diff)
parenteb3796a698e48d10b83b7b54a89f35110845cd56 (diff)
downloadasync-2a135a422f5da6ab6c8d242b2428828bb51eb1f8.tar.gz
Merge pull request #1540 from ORESoftware/patch-1
need to demonstrate error cb not just drain cb
-rw-r--r--lib/queue.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/queue.js b/lib/queue.js
index 2ba1747..7a201c4 100644
--- a/lib/queue.js
+++ b/lib/queue.js
@@ -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');