Check executable paths in load_test (#2797)
To output a descriptive error message rather than: ``` terminate called after throwing an instance of 'boost::process::process_error' what(): execve failed: No such file or directory ```
This commit is contained in:
parent
ee7656fc2c
commit
027b7a5907
1 changed files with 10 additions and 0 deletions
|
@ -412,6 +412,11 @@ int main (int argc, char * const * argv)
|
|||
}
|
||||
node_path = node_filepath.string ();
|
||||
}
|
||||
if (!boost::filesystem::exists (node_path))
|
||||
{
|
||||
std::cerr << "nano_node executable could not be found in " << node_path << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto rpc_path_it (vm.find ("rpc_path"));
|
||||
std::string rpc_path;
|
||||
|
@ -428,6 +433,11 @@ int main (int argc, char * const * argv)
|
|||
}
|
||||
rpc_path = rpc_filepath.string ();
|
||||
}
|
||||
if (!boost::filesystem::exists (rpc_path))
|
||||
{
|
||||
std::cerr << "nano_rpc executable could not be found in " << rpc_path << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::vector<boost::filesystem::path> data_paths;
|
||||
for (auto i = 0; i < node_count; ++i)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue