Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
fix: aleth shows error and exit if config file not found or empty
Browse files Browse the repository at this point in the history
close #5205
  • Loading branch information
tiendq authored and gumb0 committed Aug 23, 2018
1 parent d11338d commit fc9ec11
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions aleth/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,12 @@ int main(int argc, char** argv)
{
configPath = vm["config"].as<string>();
configJSON = contentsString(configPath.string());

if (configJSON.empty())
{
cerr << "Config file not found or empty (" << configPath.string() << ")\n";
return -1;
}
}
catch (...)
{
Expand Down

0 comments on commit fc9ec11

Please sign in to comment.