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 September 2020.
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® 2025 Language Specification # sec-aggregate-error |
브라우저 호환성
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
errors |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.