Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: error handling #72

Open
minomikula opened this issue Mar 22, 2022 · 0 comments
Open

Documentation: error handling #72

minomikula opened this issue Mar 22, 2022 · 0 comments

Comments

@minomikula
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant