Closed sdetweil closed 6 years ago
Thanks for this, though we're already discussing this in #30 and would likely require a major semver release :)
thanks.. but note that this is different.. 30 is discussing capturing STDERR.. this is on STDOUT... if this is NOT captured, the node process will die.. 30 is NICE to have.. this is MANDATORY
The cp.stdout
is returned from the start()
function, so adding an error handler shouldn't require modification to the existing library.
Something like the following example should work for handling those exceptions
const rec = record.start({
sampleRate : 44100,
verbose : true
})
rec.on('error', err => {
// an error occurred on stdout
})
rec.pipe(file)
ok, got it.. the user can handle it..
add handler for fatal error on stdout if pcm process dies, or is killed.