We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent bb17284 commit 2056139Copy full SHA for 2056139
lib/errors.js
@@ -18,7 +18,14 @@ module.exports = function (err, context) {
18
return JSON.stringify(this.toHtml());
19
},
20
toString: function () {
21
- return prettyError.render(err).replace(/webpack:\/\/\/\./g, context);
+ try {
22
+ return prettyError.render(err).replace(/webpack:\/\/\/\./g, context);
23
+ } catch (e) {
24
+ // This can sometimes fail. We don't know why, but returning the
25
+ // original error is better than returning the error thrown by
26
+ // pretty-error.
27
+ return err;
28
+ }
29
}
30
};
31
0 commit comments