I'm running a loop of geoprocessing tasks and save them in an array
promisesSeg.push(this.gpSegment_from_PM.execute(params_segment));
When all geoprocessing tasks are completed then it continue on...
Promise.all(promisesSeg).then(function (results) {
-------
---------
However, if one set of params lead to a geoprocessing error, it creates an error and terminates further processing.
Is there a way to by-pass the error and continue on with the rest of the sets of params?
Hope it makes sense.
Solved! Go to Solution.
THank you. Actually, I had to re-think the process and remove the promises. Since I was using a sync geoprocessing opeation which is already a deferred action, I didn't the need the promise. It is a lot simpler to catch errors.
Hi,
I dont know if I'm misinterpreting the question so apologies if this obvious.
Try:
Run your iteration
Except:
continue
THank you. Actually, I had to re-think the process and remove the promises. Since I was using a sync geoprocessing opeation which is already a deferred action, I didn't the need the promise. It is a lot simpler to catch errors.