Open ljharb opened 4 weeks ago
Weird, MDN says that it's already a subclass of Error:
Also inherits instance properties from its parent Error.
Ah, you're right, my mistake. These are all true:
InternalError.prototype.__proto__ === Error.prototype
InternalError.__proto__ === Error
new InternalError() instanceof Error
which suggests that Firefox can make Error.isError(new InternalError()) === true
, that everything's fine.
This error type isn't part of any spec, ~and is not
instanceof Error
,~ but should probably return true forError.isError()
.@dminor @codehag, any thoughts about ~perhaps making~ confirming that InternalError is a true subclass of Error, so that it Just Works with this proposal?
cc @nicolo-ribaudo