Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That depends, if you're using doSomethingElse a lot I'd just go ahead and wrap that as well, if you're using it once it's no big deal.

  doSomethingElse(errHandler(function(real, results) {
    // foo
  }));
  
If you're using Node you should be writing small(ish) modules anyways, so it doesn't lead to much code blote and its advantageous to consolidate your error handling in one or 2 spots.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: