-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[FEATURE] Adds a buildError hook #2832
Conversation
👍 |
/cc @rondale-sc |
@rwjblue Updated to assert the error thrown is the one received |
OOoh, fancy! Awesome stuff! Going to integrate with ember-cli-rails-addon asap. :)) |
.then(this.processAddonBuildSteps.bind(this, 'postBuild')); | ||
.then(this.processAddonBuildSteps.bind(this, 'postBuild')) | ||
.catch(function(error) { | ||
self.processAddonBuildSteps('buildError', error); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Updated to use bind in for the closure scope, throws instead of |
[FEATURE] Adds a buildError hook
buildError
hook will be called on when an error occurs during thepreBuild
orpostBuild
hooks for addons, or whenbuilder#build
fails
/cc @rwjblue