hide stack trace in export warnings

This commit is contained in:
Tobias Koppers 2016-09-07 09:46:53 +02:00
parent b24bbdcf22
commit 76efbcf801
1 changed files with 5 additions and 3 deletions

View File

@ -31,10 +31,12 @@ HarmonyImportSpecifierDependency.prototype.getWarnings = function() {
var importedModule = this.importDependency.module; var importedModule = this.importDependency.module;
if(importedModule && importedModule.meta && importedModule.meta.harmonyModule) { if(importedModule && importedModule.meta && importedModule.meta.harmonyModule) {
if(this.id && importedModule.isProvided(this.id) === false) { if(this.id && importedModule.isProvided(this.id) === false) {
var err = new Error("export '" + this.id + "'" +
(this.id !== this.name ? " (imported as '" + this.name + "')" : "") +
" was not found in '" + this.importDependency.userRequest + "'");
err.hideStack = true;
return [ return [
new Error("export '" + this.id + "'" + err
(this.id !== this.name ? " (imported as '" + this.name + "')" : "") +
" was not found in '" + this.importDependency.userRequest + "'")
]; ];
} }
} }