config_parse.py: add _append_error_ctx() to remove redundant code
config_parse.py: add _append_error_ctx() to remove redundant code

_append_error_ctx() appends context to a given `ConfigParseError`
exception and then reraises it.

Using

    catch ConfigParseError as exc:
        _append_error_ctx(exc, 'My object', 'My message')

instead of

    catch ConfigParseError as exc:
        exc.append_ctx('My object', 'My message')
        raise

makes sure we don't forget to reraise.

Signed-off-by: Philippe Proulx <2096628897b40c93960fdd9e24c9c883a54d4fe9@gmail.com>

efficios/barectf,efficios/barectf