Change return type of RtpSenderInterface::SetParameters from bool to RTCError

Note that RTCErrorTypes are mapped to the following DOMException names:
INTERNAL_ERROR -> OperationError
UNSUPPORTED_PARAMETER -> OperationError
INVALID_STATE -> InvalidStateError
INVALID_MODIFICATION -> InvalidModificationError
INVALID_RANGE -> RangeError

Bug: webrtc:8772
Change-Id: I44e3fe2456b007b8fb227d37d74b07ba226a19e4
Reviewed-on: https://webrtc-review.googlesource.com/37141
Commit-Queue: Zach Stein <zstein@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21766}
This commit is contained in:
Zach Stein
2018-01-23 15:02:36 -08:00
committed by Commit Bot
parent 3a5653af1c
commit ba37b4b075
16 changed files with 113 additions and 97 deletions

View File

@ -34,7 +34,7 @@
}
- (void)setParameters:(RTCRtpParameters *)parameters {
if (!_nativeRtpSender->SetParameters(parameters.nativeParameters)) {
if (!_nativeRtpSender->SetParameters(parameters.nativeParameters).ok()) {
RTCLogError(@"RTCRtpSender(%p): Failed to set parameters: %@", self,
parameters);
}