tc39 / proposal-explicit-resource-management

ECMAScript Explicit Resource Management

Home Page:https://arai-a.github.io/ecma262-compare/?pr=3000

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Remove support for InstallErrorCause from SuppressedError

rbuckton opened this issue · comments

Per the January 2023 plenary session, we should remove support for InstallErrorCause from the SuppressedError constructor. A SuppressedError already has two conceptual causes: the suppressing error and the suppressed error. In the case of a using declaration, a SuppressedError is only thrown when both conceptual causes are present, thus neither is definitively the "cause" of the SuppressedError.

InstallErrorCause introduces a third conceptual cause, which is an unnnecessary overcomplication. As a result, the consensus agreement is to remove support for InstallErrorCause in this case.