1.0.3 • Published 8 years ago

@ash-framework/argument-error v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

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: