Module: errorme

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
Name Type Description
overwrite boolean Whether to overwrite default defined errors list with the new provided ones or not.
showLogs boolean Whether to show logs or not. Logs show error message and error code once the getError() function being called
Author:
Source:
Returns:
Type
errorme