@creejs/commons-lang 2.1.21 → 2.1.23

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.
@@ -1501,6 +1501,11 @@
1501
1501
  * @returns {string} The string representation of the value
1502
1502
  */
1503
1503
  function safeToString (value) {
1504
+ if (value === null) {
1505
+ return 'null'
1506
+ } else if (value === undefined) {
1507
+ return 'undefined'
1508
+ }
1504
1509
  let valueStr;
1505
1510
  try {
1506
1511
  valueStr = JSON.stringify(value);
@@ -1855,12 +1860,12 @@
1855
1860
  errors.push(e);
1856
1861
  // all tasks failed
1857
1862
  if (errors.length >= tasks.length) {
1858
- deferred.reject(errors);
1863
+ deferred.reject(new AggregatedError('All Tasks Failed', errors));
1859
1864
  }
1860
1865
  });
1861
1866
  }
1862
1867
  if (errors.length === tasks.length) {
1863
- deferred.reject(errors);
1868
+ deferred.reject(new AggregatedError('All Tasks Failed', errors));
1864
1869
  }
1865
1870
  return deferred.promise
1866
1871
  }
@@ -2053,7 +2058,7 @@
2053
2058
  // No task left, and No successful execution, reject with errors
2054
2059
  if (errors.length >= tasks.length) {
2055
2060
  if (deferred.pending) {
2056
- deferred.reject(errors);
2061
+ deferred.reject(new AggregatedError('All Tasks Failed', errors));
2057
2062
  return
2058
2063
  }
2059
2064
  }