verror
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -12,3 +12,4 @@ var mod_fs = require('fs'); | ||
console.log(err3.message); | ||
console.log(err3.toString()); | ||
console.log(err3.stack); | ||
}); |
@@ -148,8 +148,6 @@ /* | ||
{ | ||
if (c instanceof Error) { | ||
if (c instanceof Error) | ||
this.we_cause = c; | ||
this.stack += '\nCaused by: ' + c.stack; | ||
} | ||
return (this.we_cause); | ||
}; |
{ | ||
"name": "verror", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "richer JavaScript errors", | ||
@@ -5,0 +5,0 @@ "main": "./lib/verror.js", |
@@ -99,4 +99,5 @@ # verror: richer JavaScript errors | ||
printf-style arguments and an optional cause), but the resulting "message" only | ||
contains the top-level error. Using the same example above, but replacing the | ||
VError in handleRequest with WError, we get this output: | ||
contains the top-level error. It's also more verbose, including the class | ||
associated with each error in the cause chain. Using the same example above, | ||
but replacing the VError in handleRequest with WError, we get this output: | ||
@@ -108,16 +109,5 @@ request failed | ||
WError: request failed; caused by failed to check "/nonexistent": ENOENT, | ||
stat '/nonexistent' | ||
WError: request failed; caused by WError: failed to check "/nonexistent"; | ||
caused by Error: ENOENT, stat '/nonexistent' | ||
and as usual, the "stack" member shows the stack trace: | ||
WError: failed to handle request; caused by WError: failed to stat "/nonexistent"; caused by Error: ENOENT, stat '/nonexistent' | ||
at /Users/dap/work/node-verror/examples/werror.js:10:13 | ||
at Object.oncomplete (fs.js:297:15) | ||
Caused by: WError: failed to stat "/nonexistent"; caused by Error: ENOENT, stat '/nonexistent' | ||
at /Users/dap/work/node-verror/examples/werror.js:7:20 | ||
at Object.oncomplete (fs.js:297:15) | ||
Caused by: Error: ENOENT, stat '/nonexistent' | ||
# Contributing | ||
@@ -124,0 +114,0 @@ |
@@ -98,4 +98,2 @@ /* | ||
'WError: proximate cause: 3 issues; caused by Error: root cause', | ||
' at Object.<anonymous> (tst.werror.js)\n' + nodestack, | ||
'Caused by: Error: root cause', | ||
' at Object.<anonymous> (tst.werror.js)' | ||
@@ -112,4 +110,2 @@ ].join('\n') + '\n' + nodestack); | ||
'WError: proximate cause: 3 issues; caused by Error: root cause', | ||
' at Object.<anonymous> (tst.werror.js)\n' + nodestack, | ||
'Caused by: Error: root cause', | ||
' at Object.<anonymous> (tst.werror.js)' | ||
@@ -116,0 +112,0 @@ ].join('\n') + '\n' + nodestack); |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
40318
528
121