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: catch unhandled exception in text extractor #112

Merged
merged 2 commits into from Jan 13, 2017
Merged

Fix: catch unhandled exception in text extractor #112

merged 2 commits into from Jan 13, 2017

Conversation

ghost
Copy link

@ghost ghost commented Jan 12, 2017

I've added a try/catch around the source of an unhandled exception that I discovered while textract'ing a few thousand files. If need be, I will find the exact cause and create a test case. Please let me know.

encoding = jschardet.detect( data ).encoding.toLowerCase();
decoded = iconv.decode( data, encoding );
} catch ( e ) {
cb( e );
Copy link
Owner

Choose a reason for hiding this comment

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

This should probably be return cb( e ), otherwise the cb will be executed twice.

Copy link
Author

Choose a reason for hiding this comment

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

Right you are, Harry.

@dbashford
Copy link
Owner

Thanks!

@dbashford dbashford merged commit 9d0aacc into dbashford:master Jan 13, 2017
@dbashford
Copy link
Owner

Released as v2.1.1

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.

1 participant