Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error handlers for Perceval iterators #58

Open
jgbarah opened this issue Sep 9, 2016 · 0 comments
Open

Error handlers for Perceval iterators #58

jgbarah opened this issue Sep 9, 2016 · 0 comments

Comments

@jgbarah
Copy link
Contributor

jgbarah commented Sep 9, 2016

Request:

Add a new option, when instantiating a Perceval iterator, to specify an error handler. This could be done similar to the errors parameter in codecs.

I would implement at least "strict" (which would always raise the exception, as it does now), "ignore" (which would ignore the item causing the exception, and go on with the next one) and maybe "logging" (which would use the logging module to log the problem, and then go on as with ignore).

Rationale:

  • Now, when some exception happens while a Perceval iterator is working, in some cases it is difficult to catch it. That can happen if for some the exception thrown cannot be caught in the calling environment.
  • In some other cases, having some error handling policy easily specified is just convenient.
valeriocos pushed a commit to valeriocos/perceval that referenced this issue Dec 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants