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

fix: handle engine error properly #3

Merged
merged 6 commits into from
Jul 1, 2021
Merged

Conversation

nikolovjd
Copy link
Contributor

In case of Engine Error, the library was creating an unhandledPromiseRejection, since the error originated in _processData which inside of an even listener, and it didn't properly propagate.

src/Avast.js Outdated Show resolved Hide resolved
src/Avast.js Outdated
this.resultMap.delete('error')

if (scanError) {
throw scanError
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ebben a method-ban minden error unhandled lesz, mivel ahol hívva van, ott nincs kezelve:

return await this._scanFile(task.filePath)

Az await miatt helyben kéne kezelni a hibákat try-cathc-el, vagy ezen a metóduson belül kell kezelni a hibákat!

@tgabi333 tgabi333 merged commit c87ccd1 into master Jul 1, 2021
@tgabi333 tgabi333 deleted the fix/unhandled-engine-error branch July 1, 2021 15:37
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

Successfully merging this pull request may close these issues.

4 participants