Skip to content

Richienb/pretty-throw

Repository files navigation

Pretty throw Travis CI Build Status

Throw formatted errors.

NPM Badge

Install

npm install pretty-throw

Usage

const prettyThrow = require("pretty-throw");
prettyThrow(new Error("Test error."));

Output

Example output

API

prettyThrow(error, options?)

error

Type: Error

The error to be thrown.

options

Type: object

exit

Type: boolean
Default: true

Exit the process after displaying the error.