-
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
Provide useful error message when styles/app.[ext] is not found #1866
Conversation
To avoid future developer confusion as witnessed on issue ember-cli#1641
57991bd
to
69360ae
Compare
|
||
if (!ext) { | ||
var attemptedExtensions = Array.isArray(this.ext) ? this.ext : [this.ext]; | ||
throw new Error('app/styles/app.[' + attemptedExtensions.join('/') + '] does not exist'); |
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.
Can you throw a SilentError instead?
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.
Agreed.
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.
@jmonster - Ping?
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.
i got this one.
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.
running tests locally now
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.
Absolutely just time constraints, I'll try to get to it this evening. On Fri, Sep 5, 2014 at 1:20 PM, stefanpenner/ember-cli [email protected] wrote: In lib/preprocessors/style-plugin.js:
@@ -15,7 +15,14 @@ StylePlugin.prototype.constructor = StylePlugin;
StylePlugin.prototype._superConstructor = Plugin;StylePlugin.prototype.toTree = function(tree, inputPath, outputPath, options) {
- var input = path.join(inputPath, 'app.' + this.getExt(inputPath, 'app'));
- var ext = this.getExt(inputPath, 'app');
- if (!ext) {
- var attemptedExtensions = Array.isArray(this.ext) ? this.ext : [this.ext];
- throw new Error('app/styles/app.[' + attemptedExtensions.join('/') + '] does not exist');
@jmonster - Ping?
—Reply to this email directly or view it on GitHub.
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.
No worries, we updated in another commit/pr and merged. Thank you!!
superseded by: #1894 |
To avoid future developer confusion as witnessed on issue #1641. This PR provides improved error messaging to assist developers in debugging their applications; it does not fix any actual bugs [since the problem is not really a bug].