AriaMinaei / AriaMinaei/pretty-error
Feature request: Reverse stack trace / message location
- Dominant language
- CoffeeScript
- Stars
- 1.5k
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
Stack traces are in generall have a not-ideal representation for CLI. If the stack is longer the message and the first trace item is at the beginning of the stack output.
It would be nice if there were an option to reverse the output.
item 3
item 2
item 1
Error: The error message
---
This is lot easier to read, try it out!
Also I show a code frame (using babel code frame) of the last trace item. The problem currently is that the code frame represents the first entry, and the first entry, which stands at the first position of the list.
So there should be 2 options:
- reverseStackTrace
- showErrorOnBottom
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the CLI stack-trace formatting and the Babel code-frame integration. Check how the first trace item, message, and code frame are currently selected and ordered. Done means the reverseStackTrace and showErrorOnBottom options produce the requested ordering and associate the code frame with the last trace item.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- babel, coffeescript, node.js
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100