HomePhabricator

Merge #14105: util: Report parse errors in configuration file

Description

Merge #14105: util: Report parse errors in configuration file

Summary:
ed2332aeffb071a3404be9cff8f9fb8a81a9fbfb test: Add test for config file parsing errors (MarcoFalke)
a66c0f78a941968340f030911765a84219908c4d util: Report parse errors in configuration file (Wladimir J. van der Laan)

Pull request description:

Report errors while parsing the configuration file, instead of silently ignoring them.

    $ src/bitcoind -regtest
    Error reading configuration file: parse error on line 22: nodebuglogfile, if you intended to specify a negated option, use nodebuglogfile=1 instead
    $ src/bitcoind -regtest
    Error reading configuration file: parse error on line 22: sdafsdfafs
    $ src/bitcoind -regtest
    Error reading configuration file: parse error on line 24: -nodebuglogfile=1, options in the configuration file must be specified without leading -

(inspired by https://github.com/bitcoin/bitcoin/pull/14100#issuecomment-417264823)

Tree-SHA512: d516342b65db2969edf200390994bbbda23654c648f85dcc99f9f2d217d3d59a72e0f58227be7b4746529dcfa54ba26d8188ba9f14a57c9ab00015d7283fade2

Backport of Core PR14105
https://github.com/bitcoin/bitcoin/pull/14105/files

Test Plan:

ninja check
test_runner.py feature_config_args

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D5009

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Sep 6 2018, 10:52
jasonbcoxCommitted on Jan 19 2020, 19:19
jasonbcoxPushed on Jan 19 2020, 19:19
Reviewer
Restricted Project
Differential Revision
D5009: Merge #14105: util: Report parse errors in configuration file
Parents
rABC86b447496146: Merge #14146: wallet: Remove trailing separators from -walletdir arg
Branches
Unknown
Tags
Unknown