防呆设计

This commit is contained in:
ziyue 2021-10-13 20:56:22 +08:00
parent dd81497e5c
commit 76ae292ae7

View File

@ -27,7 +27,7 @@ void HttpClient::sendRequest(const string &strUrl, float fTimeOutSec) {
defaultPort = 443; defaultPort = 443;
isHttps = true; isHttps = true;
} else { } else {
auto strErr = StrPrinter << "非法的协议:" << protocol << endl; auto strErr = StrPrinter << "非法的http url:" << strUrl << endl;
throw std::invalid_argument(strErr); throw std::invalid_argument(strErr);
} }