0.0.9 • Published 8 years ago

exception-methods v0.0.9

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

exception-methods

Set of exception messages for JavaScript.

Installation

To install the stable version:

npm install --save exception-methods

The Gist

import * as exceptionMethods from 'exception-methods';

console.log(exceptionMethods.argumentException('age', 'ageValue'));
console.log(exceptionMethods.invalidOperationException());
console.log(exceptionMethods.notImplementedException());
console.log(exceptionMethods.rangeException('age', -10));
console.log(exceptionMethods.typeException());
console.log(exceptionMethods.URIException());
console.log(exceptionMethods.customException('Custom Exception'));

API

MethodDescription
argumentExceptionAn exception that is useful for throwing or reporting exceptions related to function arguments
invalidOperationExceptionAn exception that is useful for throwing or reporting exceptions related to invalid operations
notImplementedExceptionAn exception that is useful for throwing or reporting exceptions related to unimplemented code
rangeExceptionAn exception that is useful for throwing or reporting exceptions related to range errors
typeExceptionAn exception that is useful for throwing or reporting exceptions related to type errors
URIExceptionAn exception that is useful for throwing or reporting exceptions related to URI errors

Examples

License

MIT

0.0.9

8 years ago

0.0.8

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago