I have a chain of promises, where I use catch to catch errors.
this.load()
.then(self.initialize)
.then(self.close)
.catch(function(error){
//error-handling
})
What function gets called if the chain has finished without rejection? I was using finally, but this gets called also if an error occurs. I'd like to call a function after the catch-function which gets only called if no promise was rejected.
I'm using node.js with the q - module.