Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年9月.
AggregateError オブジェクトは、複数のエラーを 1 つのエラーにまとめる必要があるときのエラーを表します。これは一つの操作で複数のエラーを報告する必要があるときに発生します。例えば Promise.any() において、渡されたすべてのプロミスが拒否された場合などです。
SuppressedError と比較すると、AggregateError は無関係のエラーのリストを表すのに対し、 SuppressedError は他のエラーを処理中に発生したエラーを表します。
AggregateError は Error のサブクラスです。
新しい AggregateError オブジェクトを生成します。
親である Error から継承したインスタンスプロパティもあります。
以下のプロパティは AggregateError.prototype に定義されており、すべての AggregateError インスタンスで共有されます。
AggregateError.prototype.constructorこのインスタンスオブジェクトを生成したコンストラクター関数です。AggregateError インスタンスでは、初期値は AggregateError コンストラクターです。
AggregateError.prototype.nameエラーの型の名前を表します。AggregateError.prototype.name では、初期値は "AggregateError" です。
以下のプロパティは、それぞれの AggregateError インスタンス自身のプロパティです。
errorsまとめられたエラーを表す配列です。
親である Error からインスタンスメソッドを継承しています。
| ECMAScript® 2027 Language Specification # sec-aggregate-error-objects |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2026年3月5日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.