Skip to content
This repository has been archived by the owner on Apr 11, 2018. It is now read-only.

Added patch to call the callback passed into compileFile in the event of an error thrown in compile #340

Merged

Conversation

bohnman
Copy link
Contributor

@bohnman bohnman commented Oct 9, 2013

When a callback is passed into compileFile in swig.js, this patch catches any errors thrown when calling compile and invokes the callback with an error instead.

While this patch doesn't make sure all calls are async when a callback is specified (a minor issue), this patch does address the main crux of issue #338, which is to ensure the callback is called instead of having the error be thrown.

paularmstrong added a commit that referenced this pull request Oct 9, 2013
Catch errors and send to callback if compileFile fails.
@paularmstrong paularmstrong merged commit f461f6e into paularmstrong:master Oct 9, 2013
@paularmstrong
Copy link
Owner

Thank you for following lint and writing a new test!

@bohnman bohnman deleted the handle-compile-errors-gracefully branch October 9, 2013 17:56
@bohnman
Copy link
Contributor Author

bohnman commented Oct 9, 2013

no problem. Glad to contribute!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants