- changed status to resolved
Add option to not fail on exceptions while parsing a file
Issue #13
resolved
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)
-
reporter - Log in to comment
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
#13at BB to changelog entry for 1.0.0Include filepath to error log message, if an exception is raised while processing a file.
Write a Changed item fixing
#12at BB to changelog entry for 1.0.0Fixes
#12at BB Fixes#13at BB→ <<cset 7d8603a4dac4>>