Similar to exception handling in .NET the Q promise module inside Angular.js supports a try/catch/finally construct. However as ‘finally’ is a reserved keyword in JavaScript, you have to use the indexer to access the finally function:
Similar to exception handling in .NET the Q promise module inside Angular.js supports a try/catch/finally construct. However as ‘finally’ is a reserved keyword in JavaScript, you have to use the indexer to access the finally function: