Closed paulmillr closed 8 years ago
One is in #2, but primarily it's to unforge-ably (not Object#toString
in ES6) and cross-realm (not instanceof
) detect whether something is an Error instance, for to know if the stack trace on it is reliable (wrt the current engine's reliability in that regard)
Thanks!
Could you provide a use case for checking whether the variable is an error? Was thinking of something practical but wasn't able to remember anything