Add option to not fail on exceptions while parsing a file

Issue #13 resolved
Toni Sissala created an issue

Supports the use case with a batch containing some invalid DDI-files.

User could select a flag --no-fail-on-parse. The flag would bypass a file which cannot be parsed with the selected parser. It would still need to log the error properly and include the filepath in the error log message.

Cache (especially the file-cache) must not contain files that cannot be parsed.

Comments (1)

  1. Toni Sissala reporter

    Merged in feature/13-no-fail-on-parse (pull request #2)

    Implement fail-on-parse optional argument

    BatchProcessor takes in a keyword argument fail_on_parse, which defaults to True. If a MappingError is raised during file parsing and fail_on_parse has been set to False, the processor will log an exception and continue processing the next file in the batch.

    Introduce sync-entrypoint option --no-fail-on-parse. Use it to create BatchProcessor setting for fail_on_parse. By default the sync entrypoint will set fail_on_parse = True (the previous behaviour is the default).

    Write an Added item implementing #13 at BB to changelog entry for 1.0.0

    Include filepath to error log message, if an exception is raised while processing a file.

    Write a Changed item fixing #12 at BB to changelog entry for 1.0.0

    Fixes #12 at BB Fixes #13 at BB

    → <<cset 7d8603a4dac4>>

  2. Log in to comment