浏览代码

Changed runtime_error to invalid_argument

Paul-Louis Ageneau 4 年之前
父节点
当前提交
fe6cf79f02
共有 1 个文件被更改,包括 1 次插入1 次删除
  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.