harshankur / officeParser

A Node.js library to parse text out of any office file. Currently supports docx, pptx, xlsx and odt, odp, ods..
MIT License
123 stars 17 forks source link

Fix error handling on decompress stage. #21

Closed gabrielbiga closed 9 months ago

gabrielbiga commented 9 months ago

This commit aims to fix an error handling issue on docx decompress stage.

When the file has some corruption, the library throws an error that is impossible to handle via the .catch public promise, crashing the entire application.

harshankur commented 9 months ago

@gabrielbiga Thank you so much for the correction here. You are right. Error throws inside a separate function will not be caught by the general catch of the promise. I have added a small addendum to your fix and accepted the pull request.