News for hackers. Stuff that matters.
Re:Error Handling in Nodejs by cwp on Friday July 17, 2015 @01:29PM (#9903855)
No. This is the whole point of promises.
Re:Error Handling in Nodejs by dmethvin on Friday July 17, 2015 @02:26PM (#9904345)
Perhaps the gp meant this case?

   something().then(function(){  
      setTimeout(function(){  
        whoops_not_a_function();  
      }, 1000);  
   }).catch(function(){  
      // nope, nothing to catch  
   });
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).
Re:Error Handling in Nodejs by linkmotif on Saturday July 18, 2015 @02:02PM (#9908300)
Yup this is what I meant. Thanks. Yeah arrow functions help.