Other errors besides Error should probably be able to have causes?
domenic opened this issue · comments
Domenic Denicola commented
Is there a reason the proposal is restricted to Error
? I think TypeError
s and RangeError
s and the like should all be able to have causes.
Jordan Harband commented
I’d indeed expect them all to have it, since they all inherit from Error (and an idiomatic implementation of each would call super).
Chengzhong Wu commented
The proposal is started with minimal changes. If adding cause to *Error constructors is generally acceptable, I believe it is a good idea to have them all.