fix(gulp): prevent duplicate error messages

Closes #2021
This commit is contained in:
Brian Ford
2015-05-19 16:51:57 -07:00
parent 5030ffb01c
commit 381d4cb30a
3 changed files with 31 additions and 25 deletions

View File

@ -86,17 +86,6 @@ export class AngularBuilder {
private rebuild(builder) {
return builder.build()
.then((result) => { printSlowTrees(result.graph); })
.catch((err) => {
console.error(err.toString());
// Should show file and line/col if present
if (err.file) {
console.error('File: ' + err.file);
}
if (err.stack) {
console.error(err.stack);
}
throw err;
});
.then((result) => { printSlowTrees(result.graph); });
}
}

View File

@ -94,7 +94,9 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
if (pathsWithErrors.length) {
this.previousRunFailed = true;
throw new Error('Typescript found errors listed above...');
var error = new Error('Typescript found errors listed above...');
error['showStack'] = false;
throw error;
} else if (this.previousRunFailed) {
this.doFullBuild();
}
@ -142,7 +144,9 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin {
if (errorMessages.length) {
this.previousRunFailed = true;
console.log(errorMessages.join('\n'));
throw new Error('Typescript found errors listed above...');
var error = new Error('Typescript found errors listed above...');
error['showStack'] = false;
throw error;
} else {
this.previousRunFailed = false;
}