From 7fb4998029bc10d0fc85de02570a711f83061f5d Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Thu, 14 Apr 2022 15:13:33 -0700 Subject: [PATCH] RouteGuide example: Abort if database file not found (#29398) --- examples/cpp/route_guide/helper.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/cpp/route_guide/helper.cc b/examples/cpp/route_guide/helper.cc index cd889f6a4ba..638c8c8bab5 100644 --- a/examples/cpp/route_guide/helper.cc +++ b/examples/cpp/route_guide/helper.cc @@ -53,7 +53,7 @@ std::string GetDbFileContent(int argc, char** argv) { std::ifstream db_file(db_path); if (!db_file.is_open()) { std::cout << "Failed to open " << db_path << std::endl; - return ""; + abort(); } std::stringstream db; db << db_file.rdbuf();