Re: Should Exceptions be Errors in the ECMAScript bindings?

Allen Wirfs-Brock:
> In ECMAScript, prototype chain inheritance does not establish a deep semantic "is-a" relationship. In particular,
>       var foo=Object.create(Error.prototype)
> does not give foo any special Error object internal semantic state or behavior (eg, implementation specific stack trace semantics).

What would be required to make exception objects be true Error objects? 
  Is it sufficient to have Web IDL just say that they have [[Class]] 
"Error"?  Do Error objects have any standardised behaviour that you 
wouldn't get from just using prototype inheritance as Web IDL currently 
does?

Received on Friday, 22 June 2012 06:43:55 UTC