https://github.com/richienb/pretty-throw
Throw formatted errors.
https://github.com/richienb/pretty-throw
Last synced: 19 days ago
JSON representation
Throw formatted errors.
- Host: GitHub
- URL: https://github.com/richienb/pretty-throw
- Owner: Richienb
- License: mit
- Created: 2020-01-20T13:42:48.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-20T14:16:47.000Z (almost 6 years ago)
- Last Synced: 2025-02-18T02:49:09.217Z (11 months ago)
- Language: JavaScript
- Homepage:
- Size: 194 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Pretty throw [](https://travis-ci.com/Richienb/pretty-throw)
Throw formatted errors.
[](https://npmjs.com/package/pretty-throw)
## Install
```sh
npm install pretty-throw
```
## Usage
```js
const prettyThrow = require("pretty-throw");
prettyThrow(new Error("Test error."));
```
### 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.