@creejs/commons-lang 2.1.21 → 2.1.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1853,12 +1853,12 @@ function any (tasks) {
1853
1853
  errors.push(e);
1854
1854
  // all tasks failed
1855
1855
  if (errors.length >= tasks.length) {
1856
- deferred.reject(errors);
1856
+ deferred.reject(new AggregatedError('All Tasks Failed', errors));
1857
1857
  }
1858
1858
  });
1859
1859
  }
1860
1860
  if (errors.length === tasks.length) {
1861
- deferred.reject(errors);
1861
+ deferred.reject(new AggregatedError('All Tasks Failed', errors));
1862
1862
  }
1863
1863
  return deferred.promise
1864
1864
  }
@@ -2051,7 +2051,7 @@ async function parallelAny (tasks, maxParallel = 5) {
2051
2051
  // No task left, and No successful execution, reject with errors
2052
2052
  if (errors.length >= tasks.length) {
2053
2053
  if (deferred.pending) {
2054
- deferred.reject(errors);
2054
+ deferred.reject(new AggregatedError('All Tasks Failed', errors));
2055
2055
  return
2056
2056
  }
2057
2057
  }