* @ngdoc method * @name $q#reject * @kind function * * @description * Creates a promise that is resolved as rejected with the specified `reason`. This api should be * used to forward rejection in a chain of promises. If you are dealing with the last promise in * a promise chain,
(reason)
| 18108 | * @returns {Promise} Returns a promise that was already resolved as rejected with the `reason`. |
| 18109 | */ |
| 18110 | function reject(reason) { |
| 18111 | var result = new Promise(); |
| 18112 | rejectPromise(result, reason); |
| 18113 | return result; |
| 18114 | } |
| 18115 | |
| 18116 | function handleCallback(value, resolver, callback) { |
| 18117 | var callbackOutput = null; |
no test coverage detected