AggregateError: errors
Baseline
Widely available
This feature is well established and works across many devices and browser versions. Itâs been available across browsers since â¨2020ë 9ìâ©.
AggregateError ì¸ì¤í´ì¤ì errors ë°ì´í° ìì±ìë ì§ê³ë ì¤ë¥ë¥¼
ëíë´ë ë°°ì´ì´ í¬í¨ëì´ ììµëë¤.
ê°
Arrayì´ë©°, AggregateError() ìì±ìì 첫 ë²ì§¸ ì¸ìë¡ ì ë¬ë ë°ë³µê³¼ ëì¼í ììì ê°ì ê°ì§ê³ ììµëë¤.
Property attributes of AggregateError: errors | |
|---|---|
| ì°ê¸° ê°ë¥ | ê°ë¥ |
| ì´ê±° ê°ë¥ | ë¶ê°ë¥ |
| ì¤ì ê°ë¥ | ê°ë¥ |
ìì
>errors ì¬ì©í기
js
try {
throw new AggregateError(
// An iterable of errors
new Set([new Error("some error"), new Error("another error")]),
"Multiple errors thrown",
);
} catch (err) {
console.log(err.errors);
// [
// Error: some error,
// Error: another error
// ]
}
ëª ì¸ì
| Specification |
|---|
| ECMAScript® 2026 Language Specification > # sec-aggregate-error > |