From 0de637b550d9262172744be584260b58323a795e Mon Sep 17 00:00:00 2001 From: "Michel.Ypma" Date: Tue, 3 Oct 2017 15:14:03 +0200 Subject: [PATCH] emit catched errors in serial and parallel --- packages/taskr/lib/taskr.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/taskr/lib/taskr.js b/packages/taskr/lib/taskr.js index c961a997..1a59ae23 100644 --- a/packages/taskr/lib/taskr.js +++ b/packages/taskr/lib/taskr.js @@ -118,7 +118,7 @@ class Taskr extends Emitter { try { yield Promise.all(tasks.map(t => this.start(t, opts))); } catch (err) { - // + this.emit('parallel_error', err); } } @@ -130,7 +130,7 @@ class Taskr extends Emitter { return this.start(str, opts); }, opts.val || null); } catch (err) { - this.emit('serial_error'); + this.emit('serial_error', err); } } }