tc39 / proposal-explicit-resource-management

ECMAScript Explicit Resource Management
https://arai-a.github.io/ecma262-compare/?pr=3000
BSD 3-Clause "New" or "Revised" License
725 stars 29 forks source link

Remove support for InstallErrorCause from SuppressedError #147

Closed rbuckton closed 1 year ago

rbuckton commented 1 year ago

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.