@byloth/core 2.2.1 → 2.2.2

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.
package/dist/core.esm.js CHANGED
@@ -27,7 +27,7 @@ class c extends Error {
27
27
  return e;
28
28
  if (e instanceof Error) {
29
29
  const t = new c(e.message);
30
- return t.stack = e.stack, t.name = e.name, t;
30
+ return t.stack = e.stack, t.cause = e.cause, t.name = e.name, t;
31
31
  }
32
32
  return new c(`${e}`);
33
33
  }
@@ -48,11 +48,7 @@ class c extends Error {
48
48
  * @param name The name of the exception. Default is `"Exception"`.
49
49
  */
50
50
  constructor(e, t, n = "Exception") {
51
- super(e), this.cause = t, this.name = n, t && (t instanceof Error ? this.stack += `
52
-
53
- Caused by ${t.stack}` : this.stack += `
54
-
55
- Caused by ${t}`);
51
+ super(e), this.cause = t, this.name = n;
56
52
  }
57
53
  [Symbol.toStringTag] = "Exception";
58
54
  }
@@ -914,7 +910,7 @@ class l {
914
910
  * {
915
911
  * try
916
912
  * {
917
- * if (value > 5) { throw new Error("The index is too high."); }
913
+ * if (value > 5) { throw new Exception("The index is too high."); }
918
914
  *
919
915
  * console.log(value); // 1, 2, 3, 4, 5
920
916
  * }
@@ -2832,7 +2828,7 @@ class d {
2832
2828
  * {
2833
2829
  * try
2834
2830
  * {
2835
- * if (value > 5) { throw new Error("The index is too high."); }
2831
+ * if (value > 5) { throw new Exception("The index is too high."); }
2836
2832
  *
2837
2833
  * console.log(value); // 1, 2, 3, 4, 5
2838
2834
  * }
@@ -5625,7 +5621,7 @@ function pe(i) {
5625
5621
  function ye(i) {
5626
5622
  return `${i.charAt(0).toUpperCase()}${i.slice(1)}`;
5627
5623
  }
5628
- const be = "2.2.1";
5624
+ const be = "2.2.2";
5629
5625
  export {
5630
5626
  w as AggregatedAsyncIterator,
5631
5627
  h as AggregatedIterator,