Skip to content

Commit

Permalink
Reserve error stack information (#2871)
Browse files Browse the repository at this point in the history
* Reserve error stack information

* fix ts error

* Make code looking clear

* only left message assignment
  • Loading branch information
LongTengDao authored and lukastaegert committed May 27, 2019
1 parent 455e994 commit 941e822
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ModuleLoader.ts
Expand Up @@ -309,9 +309,9 @@ export class ModuleLoader {
timeEnd('load modules', 3);
let msg = `Could not load ${id}`;
if (importer) msg += ` (imported by ${importer})`;

msg += `: ${err.message}`;
throw new Error(msg);
err.message = msg;
throw err;
})
.then(source => {
timeEnd('load modules', 3);
Expand Down

0 comments on commit 941e822

Please sign in to comment.