]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: config: improve .if condition error reporting
authorWilly Tarreau <w@1wt.eu>
Thu, 6 May 2021 13:07:10 +0000 (15:07 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 6 May 2021 15:02:36 +0000 (17:02 +0200)
commit299bd1c3ae516f02f6f07c8ae157067f50aecb58
tree7b78647fa1852188707d99f48776ba44cb7000be
parenta43dfda4e12c6cbc4dc5b396d19e02d26d8c2a93
MINOR: config: improve .if condition error reporting

Let's return the position of the first unparsable character on error,
so that instead of just saying "unparsable conditional expression blah"
we can have:

  [ALERT] 125/150618 (13995) : parsing [test-conds2.cfg:1]: unparsable conditional expression '12/blah' in '.if' at position 1:
    .if 12/blah
        ^
This is important because conditions will be made from environment
variables or later from more complex expressions where the error will
not always be easy to locate.
src/cfgparse.c