Update qhelp example to more accurately demonstrate flagged cases

This commit is contained in:
Napalys Klicius
2025-06-02 19:08:33 +02:00
parent bf2f19da56
commit 7993f7d8c8

View File

@@ -2,5 +2,7 @@ const fs = require('fs');
const source = fs.createReadStream('source.txt');
const destination = fs.createWriteStream('destination.txt');
// Bad: No error handling
source.pipe(destination);
// Bad: Only destination has error handling, source errors are unhandled
source.pipe(destination).on('error', (err) => {
console.error('Destination error:', err);
});