UNPKG

278 Btext/coffeescriptView Raw
1error = require './error-middleware'
2
3module.exports = exec = (f) -> (req, res, next) ->
4 f req, (err, result) ->
5 return exec.errorCallback req, res, err, 'exec' if err?
6 next()
7
8module.exports.defaultErrorCallback = error
9module.exports.errorCallback = error