Closed CamiloManrique closed 3 years ago
If there is an error while processing the CSV, the error event is never emitted. Take this for example:
let inputStream = Fs.createReadStream(Path.join(__dirname, 'test-auto-parse.csv'), 'utf8'); let output = []; inputStream .pipe(new CsvReadableStream({ parseNumbers: true, parseBooleans: true, trim: true, asObject: false, skipHeader: true, })) .on('data', row => { // Imagine an error is thrown here for any reason }) .on('end', () => { resolve(output); }) .on('error', err => { reject(err); // This is never executed });
Instead the error is uncaught.
If there is an error while processing the CSV, the error event is never emitted. Take this for example:
Instead the error is uncaught.