Skip to content
Snippets Groups Projects
Commit 8e2f11b8 authored by FU Chengdong's avatar FU Chengdong
Browse files

add error message while cannot open file

parent 98a26194
No related branches found
No related tags found
No related merge requests found
...@@ -209,6 +209,13 @@ bool FieldMapFileProvider::loadCSV(const std::string& fn, ...@@ -209,6 +209,13 @@ bool FieldMapFileProvider::loadCSV(const std::string& fn,
std::ifstream input(fn); std::ifstream input(fn);
std::string tmpline; std::string tmpline;
if (!input) {
std::cout << "Open file failure: please check file name and path! " << std::endl;
std::cout << "Notice: need absolute path or relative to path to run job!" << std::endl;
std::string error_msg = "[ERROR] FieldMapFileProvider: Cannot open " + fn;
throw std::runtime_error(error_msg);
}
ncol = 0; ncol = 0;
nrow = 0; nrow = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment