mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Update qhelp example to more accurately demonstrate flagged cases
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user