Webrtc-pc: Make RTCError inherit from DOMException?

Created on 23 Jan 2019  路  3Comments  路  Source: w3c/webrtc-pc

According to @domenic it is now possible to define IDL types that inherit from DOMException.
This would allow us to do a pure IDL specification of RTCError, which is a far simpler specification than the one we're doing now (and comports with the one in-progress implementation I know about).

DOMException spec:
https://heycam.github.io/webidl/#idl-DOMException

Should we do this?

PR exists

Most helpful comment

This is great if possible. One thing that needs to be decided is what new RTCError().code should return, probably zero.

All 3 comments

This would also be a lot simpler to implement (I'll update my CL to verify). The RTCError is not implemented by any browser yet and in my intent to implement & ship we got pushback.

Should we do this? I think so.

This is great if possible. One thing that needs to be decided is what new RTCError().code should return, probably zero.

Implementing RTCError to extend DOMException in chromium was trivial.

Was this page helpful?
0 / 5 - 0 ratings