Added RAY_CHECK with line num and file name for logs

This commit is contained in:
Wapaul1
2016-06-13 00:07:22 +00:00
parent 41539141af
commit 4e885d4896
10 changed files with 111 additions and 236 deletions
+3 -6
View File
@@ -10,14 +10,11 @@ inline std::string::iterator split_ip_address(std::string& ip_address) {
if(split_end != ip_address.end() && *split_end == ':') {
return split_end;
}
RAY_LOG(RAY_FATAL, "ip address should contain a port number");
RAY_CHECK(false, "ip address should contain a port number");
} else { // IPv4
auto split_point = std::find(ip_address.rbegin(), ip_address.rend(), ':').base();
if (split_point == ip_address.begin()) {
RAY_LOG(RAY_FATAL, "ip address should contain a port number");
} else {
return split_point;
}
RAY_CHECK_NEQ(split_point, ip_address.begin(), "ip address should contain a port number");
return split_point;
}
}