Pass Error
This module implements the pass pattern
You can use it to turn all youre node.js code that looks like this
pass = ;redis = ; { redis;}
Into this
pass = ;redis = ; { redis;}
pass(pass, fail, customError = null, context = undefined)
- pass
- This is the callback that will be invoked when no error is present. The error argument will be dropped from the arguments it receives as we've already verified that it is not an error
- fail
- This is the callback that will be invoked when an error is present. The
arguments will be untouched and will be the typical
(error, values...)
convention
- This is the callback that will be invoked when an error is present. The
arguments will be untouched and will be the typical
- customError
- If this value is non null then it's value will be used to replace any error values that would be passed in otherwise
- context
- This is an optional object context to bind to