Skip to content

Error handlers for Perceval iterators #58

Open
@jgbarah

Description

@jgbarah

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions