Remove try catch from provided functions, user handles errors

This commit is contained in:
Jerry Kurian
2019-09-12 09:41:04 -04:00
parent 586f618e95
commit 517e281ce5
11 changed files with 26 additions and 74 deletions

View File

@@ -18,12 +18,8 @@ function _accumulator<T>(
return new Transform({
...options,
transform(data: T, encoding, callback) {
try {
accumulateBy(data, buffer, this);
callback();
} catch (err) {
callback(err);
}
accumulateBy(data, buffer, this);
callback();
},
flush(callback) {
if (shouldFlush) {