11.1 RTCError
Interface
- WebIDL[Exposed=Window]
- interface
RTCError
: DOMException {constructor
(RTCErrorInit
init, optional DOMString message = "");- readonly attribute
RTCErrorDetailType
errorDetail
;- readonly attribute long?
sdpLineNumber
;- readonly attribute long?
sctpCauseCode
;- readonly attribute unsigned long?
receivedAlert
;- readonly attribute unsigned long?
sentAlert
;- };
11.1.1 Constructors
constructor()
Run the following steps:
Let init be the constructor’s first argument.
Let message be the constructor’s second argument.
Let e be a new
RTCError
object.Invoke the
DOMException
constructor of e with themessage
argument set to message and thename
argument set to"OperationError"
.Note
This name does not have a mapping to a legacy code so e.
code
will return 0.Set all
RTCError
attributes of e to the value of the corresponding attribute in init if it is present, otherwise set it tonull
.Return e.
11.1.2 Attributes
errorDetail
of type RTCErrorDetailType, readonly
The WebRTC-specific error code for the type of error that occurred.
sdpLineNumber
of type long, readonly, nullable
If errorDetail
is “sdp-syntax-error
“ this is the line number where the error was detected (the first line has line number 1).
sctpCauseCode
of type long, readonly, nullable
If errorDetail
is “sctp-failure
“ this is the SCTP cause code of the failed SCTP negotiation.
receivedAlert
of type unsigned long, readonly, nullable
If errorDetail
is “dtls-failure
“ and a fatal DTLS alert was received, this is the value of the DTLS alert received.
sentAlert
of type unsigned long, readonly, nullable
If errorDetail
is “dtls-failure
“ and a fatal DTLS alert was sent, this is the value of the DTLS alert sent.
(Feature at Risk) Issue 1
All attributes defined in RTCError
are marked at risk due to lack of implementation (errorDetail
, sdpLineNumber
, sctpCauseCode
, receivedAlert
and sentAlert
). This does not include attributes inherited from DOMException
.