Permalink
Browse files

Improve error message

  • Loading branch information...
1 parent b916a6c commit 85a9abf452294df2988a04866e2cdcfa2585af3c @medikoo committed Mar 18, 2013
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/parser.js
View
@@ -209,9 +209,10 @@ parser = {
nmSource[name] = cache;
if (main === name) {
throw new Error("Cannot require " + stringify(name) +
- ". Native node.js modules are not ported to client-side. " +
- "You can however provide alternative version of this module in " +
- "your node_modules path, it will be picked up by Webmake");
+ " (as in '" + fromfile + "').\n Native node.js modules" +
+ " are not ported to client-side. You can however provide" +
+ " alternative version of this module in your node_modules" +
+ " path, it will be picked up by Webmake.\n");
}
}
if (!main && endsWith.call(path, filename + '.js')) {

0 comments on commit 85a9abf

Please sign in to comment.