* Internal method to set the error of an execution. * @ignore
(index, err)
| 321 | * @ignore |
| 322 | */ |
| 323 | setError(index, err) { |
| 324 | this.totalExecuted++; |
| 325 | |
| 326 | if (this.errors.length < this._maxErrors) { |
| 327 | this.errors.push(err); |
| 328 | } |
| 329 | |
| 330 | if (this._collectResults) { |
| 331 | this.resultItems[index] = err; |
| 332 | } |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | exports.executeConcurrent = executeConcurrent; |