yazl icon indicating copy to clipboard operation
yazl copied to clipboard

Documentation: error handling

Open minomikula opened this issue 2 years ago • 0 comments

Hi,

I noticed that you throw errors on the instance of ZipFile class. So should I catch errors like this?

var zipfile = new yazl.ZipFile();
//...
zipfile.on('error', error=>console.error(error));

This was only way how to prevent termination of the process when for example I tried to add to zip path, that does not exists.

If this is the correct way, could you please add it to documentation? Also if this is the correct way, typing on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/yazl/index.d.ts does not allow this call.

minomikula avatar Mar 22 '22 15:03 minomikula