After 'error' event of a WritableStream

12 views
Skip to first unread message

Woody Wu

unread,
Jul 9, 2017, 2:47:47 AM7/9/17
to nodejs
Hi, List

After searched some dos, I am still not sure about how to write stable event handler for WritableStream.  I want to ask, after the 'error' event, still the 'finish' event be emitted anyway? Because I have to call my callback function after end of writing a file, I need to ensure my callback will be always called and called only once.

BTW: the WritableStream I mentioned was an instance created via fs.createWritableStream(filename).

Thanks in advance!
-woody

Reply all
Reply to author
Forward
0 new messages