Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kolbma/node-n4v-app-error
Extendable Error class
https://github.com/kolbma/node-n4v-app-error
Last synced: 21 days ago
JSON representation
Extendable Error class
- Host: GitHub
- URL: https://github.com/kolbma/node-n4v-app-error
- Owner: kolbma
- Created: 2018-06-29T12:00:00.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T06:02:10.000Z (almost 2 years ago)
- Last Synced: 2024-10-15T04:24:49.110Z (about 1 month ago)
- Language: TypeScript
- Size: 393 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# net4VISIONS AppError class
This is an extendable class for handling custom erros in Node.js projects.
It provides TypeScript typings.
## Installation
`npm i n4v-app-error`
## Usage
### TypeScript
``` TypeScript
import { AppError } from 'n4v-app-error';class MyError extends AppError {
name = 'MyError';
}new MyError('something goes wrong %d times', 2);
```### JavaScript
``` JavaScript
const AppError = require('n4v-app-error').AppError;new AppError('something goes wrong %d times', 2);
```