errorme module.
- Source:
(require("errorme"))(errorsToBeAdded, option) → {errorme}
Requiring module. Extra errors can be added only once i.e. at the first require().
Adding after initialization i.e. during next time require() will throw error.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
errorsToBeAdded |
Object | array | Either array or key/value array which will have information of new errors. All errors should have unique name and code. The style of objects should be the same as in /constants/default.json file. If the argument is array then every object of array should have extra "NAME" property which should be unique. | |||||||||
option |
Object | Optional argument
Properties
|
- Source:
Returns:
- Type
- errorme