From efe043e42bace8bf698ea49717f67ac985d19776 Mon Sep 17 00:00:00 2001 From: Ruben Bridgewater Date: Wed, 3 Apr 2019 19:18:57 +0200 Subject: [PATCH] stream: use an assertion for weird error cases These two cases should only happen in case there's a bug in our implementation or the user manipulated things pretty bad. So instead of using our regular error system for these two cases, use a simple assertion. --- doc/api/errors.md | 28 ++++++++++++++++++---------- lib/_stream_transform.js | 18 +++++++----------- lib/internal/errors.js | 7 ------- 3 files changed, 25 insertions(+), 28 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index a1fb20e58fcf96..864ee632eae536 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1822,16 +1822,6 @@ cannot be serialized. This can only happen when native addons create `SharedArrayBuffer`s in "externalized" mode, or put existing `SharedArrayBuffer` into externalized mode. - -### ERR_TRANSFORM_ALREADY_TRANSFORMING - -A `Transform` stream finished while it was still transforming. - - -### ERR_TRANSFORM_WITH_LENGTH_0 - -A `Transform` stream finished with data still in the write buffer. - ### ERR_TTY_INIT_FAILED @@ -2165,6 +2155,24 @@ removed: v10.0.0 Used when a TLS renegotiation request has failed in a non-specific way. + +### ERR_TRANSFORM_ALREADY_TRANSFORMING + + +A `Transform` stream finished while it was still transforming. + + +### ERR_TRANSFORM_WITH_LENGTH_0 + + +A `Transform` stream finished with data still in the write buffer. + ### ERR_UNKNOWN_BUILTIN_MODULE