Skip to content

Commit 7fb4998

Browse files
authored
RouteGuide example: Abort if database file not found (grpc#29398)
1 parent 214e3f3 commit 7fb4998

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/cpp/route_guide/helper.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ std::string GetDbFileContent(int argc, char** argv) {
5353
std::ifstream db_file(db_path);
5454
if (!db_file.is_open()) {
5555
std::cout << "Failed to open " << db_path << std::endl;
56-
return "";
56+
abort();
5757
}
5858
std::stringstream db;
5959
db << db_file.rdbuf();

0 commit comments

Comments
 (0)