]> granicus.if.org Git - pdns/commit
Improve commandline error reporting for non-opts
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 10 Sep 2019 15:26:35 +0000 (17:26 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 10 Sep 2019 15:26:35 +0000 (17:26 +0200)
commit94ea3c7b968421bc43a2ea81ed17372ccb14c4e1
tree33e4bc0ea45482a2bb184407befb787bc7b40554
parent7d67fb83ce443d92a131752af88fcd8b30548c2f
Improve commandline error reporting for non-opts

Before:

```
pdns_server --launch=random --socket-dir=. foo
Fatal: non-option on the command line, perhaps a '--setting=123' statement missed the '='?
```

After:
```
pdns_server --launch=random --socket-dir=. bar
Sep 10 17:24:25 Unable to open /usr/local/etc/pdns.conf
Fatal: non-options (bar) on the command line, perhaps a '--setting=123' statement missed the '='?

pdns_server --launch=random --socket-dir=. bar foo
Sep 10 17:24:25 Unable to open /usr/local/etc/pdns.conf
Fatal: non-options (bar, foo) on the command line, perhaps a '--setting=123' statement missed the '='?
```
pdns/pdns_recursor.cc
pdns/receiver.cc