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

Error swallowed if thrown by compiler function #3

Open
joefitter opened this issue Feb 9, 2017 · 2 comments
Open

Error swallowed if thrown by compiler function #3

joefitter opened this issue Feb 9, 2017 · 2 comments

Comments

@joefitter
Copy link
Contributor

joefitter commented Feb 9, 2017

All errors thrown by compiler function are swallowed in this catch - https://github.com/UKHomeOffice/i18n-lookup/blob/master/lib/i18n-lookup.js#L26-L28

This lead to a hard-to-find bug when the compile function included a require to a missing dependency, which just causes the lookup to silently fail and return null

@lennym
Copy link
Contributor

lennym commented Feb 9, 2017

How would you like it to work?

@joefitter
Copy link
Contributor Author

Not sure - I guess we'll see if the try-catch was intentionally catching a particular error thrown by the compiler

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

2 participants