@ash-framework/argument-error
v1.0.3
Published
Class for throwing descriptive user errors when bad arguments are passed to functions/classes
Downloads
20
Readme
Class for throwing descriptive user errors when bad arguments are passed to functions/classes
NPM
Usage
const context = 'User'
const argumentName = 'name'
const additionalMessage = 'expected a "String" but a "Number" was given'
const error = new ArgumentError(context, argumentName, additionalMessage)
error.message
// 'Argument "name" given to "User" expected a "String" but a "Number" was given'
Discover the release history by heading on over to the releases page.
These amazing people are maintaining this project:
These amazing people have contributed finances to this project:
Become a sponsor!
These amazing people have contributed code to this project:
Unless stated otherwise all works are:
and licensed under: