Skip to content

Conversation

@tmathern
Copy link
Collaborator

@tmathern tmathern commented Jan 6, 2026

Changes in this pull request

Add Reader factory

Adds a try_create method on Reader class (as class method) that acts as a factory method for Reader objects:

  • if there is JUMBF (c2pa/manifest) data to read, from_asset will return a Reader instance
  • if there is no JUMBF (c2pa/manifest) data to read, returns None instead of throwing

Fix exception classes hierarchy

  • Fixes exception hierarchies to be able to leverage typed exceptions better
  • Still keeps backwards compatibility with previous exception handling

Checklist

  • This PR represents a single feature, fix, or change.
  • All applicable changes have been documented.
  • Any TO DO items (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.

@tmathern tmathern self-assigned this Jan 6, 2026
@tmathern tmathern requested a review from gpeacock January 6, 2026 19:25
@tmathern tmathern requested a review from ok-nick January 6, 2026 23:28
@tmathern tmathern requested a review from scouten-adobe January 6, 2026 23:45
@tmathern tmathern changed the title fix: Add a from_asset method on Reader fix: Add a try_create method on Reader Jan 6, 2026
@tmathern tmathern closed this Jan 7, 2026
@tmathern tmathern reopened this Jan 7, 2026
@tmathern tmathern removed the on-hold label Jan 7, 2026
@tmathern tmathern closed this Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants