News for hackers. Stuff that matters.
Re:Error Handling in Nodejs by phs2501 on Friday July 17, 2015 @03:33PM (#9904778)
No built-in help with native promises, but with something like Bluebird you'd prefer:

   something().then(() => {  
      return Promise.delay(1000).then(() => {  
        whoops_not_a_function();  
      });  
   }).catch(() => {  
      // whoops_not_a_function is not defined  
   });
...or write Promise_delay yourself on top of native promises (but really just use Bluebird).

There are no comments on this comment yet.