I'm not sure about why it happens but textNode.childNodes[0] is undefined which then fails. The error is not caught since it's part of the lambda function given to map.
The problem is that, since those errors are inside a lambda function, they can't be caught by outside promise .catch'es or try {} catch blocks.
I would make a pull request but since I'm not very familiar with the code, I'm not sure what the right approach would be - it would take a lot of try {} catches to cover all the lambda functions in the file. All the parse functions have a lambda in the .forEach call and a couple in the .filter and .map calls.
If I can help with something to fix this, please let me know,
Voicu
Hi,
I've run into an unhandled exception at line https://github.com/harshankur/officeParser/blob/1ad0832227a490be7bb9b2278ba1572b17dfff38/officeParser.js#L169 (while processing a powerpoint file)
I'm not sure about why it happens but textNode.childNodes[0] is undefined which then fails. The error is not caught since it's part of the lambda function given to map.
The problem is that, since those errors are inside a lambda function, they can't be caught by outside promise .catch'es or try {} catch blocks.
I would make a pull request but since I'm not very familiar with the code, I'm not sure what the right approach would be - it would take a lot of try {} catches to cover all the lambda functions in the file. All the parse functions have a lambda in the .forEach call and a couple in the .filter and .map calls.
If I can help with something to fix this, please let me know, Voicu