mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-11-16 15:57:39 +00:00
Exit early if command line is invalid
This commit is contained in:
parent
8a2a9a99a9
commit
a92ca028b1
1 changed files with 7 additions and 0 deletions
|
@ -62,6 +62,13 @@ p2pool::p2pool(int argc, char* argv[])
|
|||
LOGINFO(1, log::LightCyan() << VERSION);
|
||||
|
||||
Params* p = new Params(argc, argv);
|
||||
|
||||
if (!p->valid()) {
|
||||
LOGERR(1, "Invalid or missing command line. Try \"p2pool --help\".");
|
||||
delete p;
|
||||
throw std::exception();
|
||||
}
|
||||
|
||||
m_params = p;
|
||||
|
||||
#ifdef WITH_UPNP
|
||||
|
|
Loading…
Reference in a new issue