DX: Cleaner stack traces
See original GitHub issueThis is an idea for cleaner stack traces pointing directly to where errors exist.
https://github.com/sindresorhus/clean-stack
console.log(error.stack);
/* Before
Error: Missing unicorn
at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:139:18)
*/
console.log(cleanStack(error.stack));
/* After
Error: Missing unicorn
at Object.<anonymous> (/Users/sindresorhus/dev/clean-stack/unicorn.js:2:15)
*/
I’m playing around with this idea right now.
I would love to hear feedback from the community.
Any potential downsides to this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Stack Trace Cleaning • NServiceBus Samples • Particular Docs
The Stack Trace Cleaner ... The cleaner uses some simple string manipulation to remove much of the noise from the exception information. It...
Read more >org.mockito.exceptions.stacktrace.StackTraceCleaner.isIn ...
Finds the source file of the target stack trace. * Returns the default value if source file cannot be found.
Read more >Passing an async function as a callback causes the error stack ...
Missing stack trace has nothing to do with Promises. Write the same code that has functions calling each other in synchronous way and...
Read more >Cleaner stacktraces. | Codementor
Make your stack-traces terser, and hide sensitive information.
Read more >Navigating Stacktraces :: CIDER Docs
The stacktrace buffers provide such an option when displaying an internal error. A toggle button will be displayed with the error type's name,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yeah maybe it should work like:
With
SLS_DEBUG
off (aka default)With
SLS_DEBUG
onClosing as it was probably addressed in best possible way with https://github.com/serverless/serverless/pull/6502
Now we show stack traces only for programmer errors (so unexpected crashes that in all cases signal a bug) or when user has set
SLS_DEBUG
. In all other cases we show only error message which is expected to be meaningful enough (if it’s not it’s an error reporting bug)