include-all
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -298,8 +298,11 @@ /** | ||
else { | ||
e.originalErrorCode = e.code; | ||
e.code = 'include-all:COULD_NOT_REQUIRE'; | ||
// Maintain the original stack trace at the top lvl (because it might have a useful line number from app-level code) | ||
// but prepend an additional message to clarify what's going on. | ||
e.stack = '`include-all` attempted to `require('+filepath+')`, but an error occurred:: \nDetails:' + e.stack; | ||
throw e; | ||
var err = new Error('Attempted to `require(\''+filepath+'\')`, but an error occurred:\n```\n' + e.stack + '\n```'); | ||
err.code = 'include-all:COULD_NOT_REQUIRE'; | ||
err.raw = e; | ||
err.filepath = filepath; | ||
throw err; | ||
// Note: In Node v4.x, an unhandled exception is necessary in order to actually | ||
// see where the problem from the syntax error occurred. (Otherwise, you just see | ||
// `exports.runInThisContext` in the stack trace, which is less than helpful!) | ||
} | ||
@@ -306,0 +309,0 @@ }//</catch> |
{ | ||
"name": "include-all", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "An easy way to include all node.js modules within a directory.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
35843
514