2.2.2 • Published 8 months ago

nodexh v2.2.2

Weekly downloads
3
License
MIT
Repository
github
Last release
8 months ago

NodeXH: NodeJS With a Better Exception Handler

Table of Contents generated with DocToc

What It Is

NodeXH is a drop-in wrapper for the NodeJS executable hat provides better stacktraces.

How to Install

npm install -g nodexh

How to Use

Use nodexh path/to/file.js instead of node path/to/file.js, and you're good to go.

What to Expect

  • Stack trace items will be reversed, so most recent calls will be shown last, i.e. also closest to where the cursor of your terminal is.
  • Stack traces will show source contexts (3 lines by default) except where files can not be opened or are NodeJS internals.
  • Source code shown will honor sourcemaps, which is great when you're using the likes of CoffeeScript or TypeScript.
  • The error message will be repeated to avoid having to scroll up when stack traces get longer.
  • Colors!

Related

To Do

  • Add error.name, error.code; where node reports TypeError: TEMPLATES.main_2 is not a function, nodexh only reports EXCEPTION: TEMPLATES.main_2 is not a function
  • visually indicate spot of error (e.g. by reversing)
  • fix async stacktraces (probably not yet handled correctly; might be issue with stackman?)
  • consider utf8ize-sourcemaps in case there should be problems w/ 32bit characters
  • truncate long lines in context
  • offer capabilities of NodeXH as API so applications (such as test libraries) can easily retrieve source code, display source lines with contexts
2.2.1

8 months ago

2.2.2

8 months ago

2.2.0

1 year ago

2.1.1

2 years ago

2.1.0

2 years ago

2.0.0

3 years ago

2.0.0-pre

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.1.0

4 years ago

0.0.2

4 years ago