Skip to content

[FEATURE] Adds a buildError hook#2832

Merged
rwjblue merged 1 commit intoember-cli:masterfrom
danmcclain:buildError
Dec 24, 2014
Merged

[FEATURE] Adds a buildError hook#2832
rwjblue merged 1 commit intoember-cli:masterfrom
danmcclain:buildError

Conversation

@danmcclain
Copy link
Contributor

buildError hook will be called on when an error occurs during the
preBuild or postBuild hooks for addons, or when builder#build
fails

/cc @rwjblue

@rwjblue
Copy link
Member

rwjblue commented Dec 24, 2014

👍

@rwjblue
Copy link
Member

rwjblue commented Dec 24, 2014

/cc @rondale-sc

@danmcclain
Copy link
Contributor Author

@rwjblue Updated to assert the error thrown is the one received

@rondale-sc
Copy link
Contributor

OOoh, fancy! Awesome stuff! Going to integrate with ember-cli-rails-addon asap. :))

Copy link
Contributor

Choose a reason for hiding this comment

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

our convention is to use bind over self+closure like above

Copy link
Member

Choose a reason for hiding this comment

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

We need to use the closure here to return the original error.

Copy link
Contributor

Choose a reason for hiding this comment

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

this is not happening, the only closed over var is self.

`buildError` hook will be called on when an error occurs during the
`preBuild` or `postBuild` hooks for addons, or when `builder#build`
fails
@danmcclain
Copy link
Contributor Author

Updated to use bind in for the closure scope, throws instead of Promise.reject (I thought it failed locally with throw, but it is fine with throw)

/cc @stefanpenner @rwjblue

rwjblue added a commit that referenced this pull request Dec 24, 2014
[FEATURE] Adds a buildError hook
@rwjblue rwjblue merged commit ffd52b5 into ember-cli:master Dec 24, 2014
@danmcclain danmcclain deleted the buildError branch December 26, 2014 16:42
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.

4 participants