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 callback support #41

Closed
wants to merge 3 commits into from
Closed

Error callback support #41

wants to merge 3 commits into from

Conversation

guybedford
Copy link
Contributor

As discussed in #39.

@@ -99,10 +108,12 @@ define(['coffee-script'], function (CoffeeScript) {
}
//Make sure we return a JavaScript string and not a Java string.
content = String(stringBuffer.toString()); //String
} catch (err) {
errback(err);
Copy link
Member

Choose a reason for hiding this comment

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

Seems like this should do an if (errback) { } and if not not, then just rethrow.

@jrburke
Copy link
Member

jrburke commented Jan 1, 2013

In addition to the inline comments, it looks like the node definition for fetchText would need to be modified -- fs.readFileSync could throw. Also there is a try/catch around CoffeeScript.compile() that should take into account calling an errback if available.

Closing for now, as I think it needs more work, and want to triage open issues, but feel free to post an update and we can reopen as needed.

@jrburke jrburke closed this Jan 1, 2013
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.

2 participants