|
|
|
|
|
by embwbam
4884 days ago
|
|
I've tried stuff like this before, but it clutters your code pretty bad anyway, doesn't it? You have to do something like this: function myAsyncThing(cb) {
var handleErrors = errHandler(cb)
doSomethingElse(handleErrors(function(data) {
// repeat. use handleErrors at each callback.
}))
}
Am I missing something? Can you get it cleaner than that? |
|