Skip to content

Commit

Permalink
style: 💄 add log to track stream.push after eof
Browse files Browse the repository at this point in the history
  • Loading branch information
touv committed Apr 23, 2024
1 parent 67ef8e2 commit b64432f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/core/src/engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,10 @@ export default class Engine extends SafeTransform {
const push = (data) => {
if (data === null) {
this.nullWasSent = true;
this.nullWasSentError = createErrorWith(new Error('As a reminder, the end was recorded at this point'), currentIndex, this.funcName, this.params, chunk);
} else if (this.nullWasSent) {
console.warn(createErrorWith(new Error('Oops, that\'s going to crash ?'), currentIndex, this.funcName, this.params, chunk));
console.warn(this.nullWasSentError);
}
if (!this.nullWasSent && this._readableState.ended) {
return warn(new Error('No back pressure control ?'));
Expand Down

0 comments on commit b64432f

Please sign in to comment.