Skip to content
This repository was archived by the owner on Aug 8, 2026. It is now read-only.

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Error Maker

Error Maker is a library for making new error types easily.

Installation

Use the package manager npm or yarn to install Error Maker.

npm i error-maker
# OR
yarn add error-maker

Usage

Using CommonJS

const ErrorFactory = require('error-maker');
const ValidationError = ErrorFactory.create('ValidationError');
// ...
throw new ValidationError('Invalid input');
// Or you can specify an additional cause
throw new ValidationError('Invalid input', 'there it goes!');

Using ES Modules

import ErrorFactory from 'error-maker';
const ValidationError = ErrorFactory.create('ValidationError');
// ...
throw new ValidationError('Invalid input');
// Or you can specify an additional cause
throw new ValidationError('Invalid input', 'there it goes!');

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

GPL-3.0

About

Just a simple error maker!

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages