Explorar o código

Changed runtime_error to invalid_argument

Paul-Louis Ageneau %!s(int64=4) %!d(string=hai) anos
pai
achega
fe6cf79f02
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/peerconnection.cpp

+ 1 - 1
src/peerconnection.cpp

@@ -738,7 +738,7 @@ shared_ptr<DataChannel> PeerConnection::emplaceDataChannel(Description::Role rol
 	if (init.id) {
 		stream = *init.id;
 		if (stream == 65535)
-			throw std::runtime_error("Invalid DataChannel id");
+			throw std::invalid_argument("Invalid DataChannel id");
 	} else {
 		// The active side must use streams with even identifiers, whereas the passive side must use
 		// streams with odd identifiers.