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

Externalise PNG validation error messages. #134

Closed
carlwilson opened this issue Oct 10, 2016 · 5 comments
Closed

Externalise PNG validation error messages. #134

carlwilson opened this issue Oct 10, 2016 · 5 comments
Assignees
Labels
feature New functionality to be developed P2 Medium priority issues to be scheduled in a future release

Comments

@carlwilson
Copy link
Member

carlwilson commented Oct 10, 2016

Dev Effort

1D

Description

In order to improve the way that JHOVE reports validation errors we first need move the error messages into a single place. This has currently been done here for the PDF Module. The work is a little painful, but necessary if we're to improve JHOVE's reporting.

The comments at the top of the PDF Constants file. Please talk to @carlwilson if you need more guidance.

@carlwilson carlwilson added the feature New functionality to be developed label Oct 10, 2016
@carlwilson carlwilson added this to the JHOVE hack day activities milestone Oct 10, 2016
@ross-spencer ross-spencer self-assigned this Oct 10, 2016
@ross-spencer
Copy link

@ross-spencer
Copy link

Thus far, 66 strings have been extracted with source code links form each of the PNG modules.

Type, Explanation, Examples, Impact, Cure, Classification still need filling in at time of writing.

@carlwilson
Copy link
Member Author

Thanks for this, I'll take a look at the module and see what I can do about externalising these in the code a little later today.

@samalloing
Copy link
Collaborator

I updated this, filled in the type column and added the Constant column

@carlwilson carlwilson modified the milestones: JHOVE hack day activities, Legacy testing backlog cleared, Release v1.18 Jan 25, 2018
@ghost ghost modified the milestones: Release v1.20, v1.24-m4 Release Feb 28, 2019
@ghost ghost added the P2 Medium priority issues to be scheduled in a future release label Feb 28, 2019
@ghost ghost modified the milestones: v1.24-m4 Release, Dev hack week initiation Feb 28, 2019
@carlwilson
Copy link
Member Author

Hi @samalloing and @jacobtakema. I've now assigned this issue to you. To see how this works in practise you can take a look at any of the main JHOVE modules. The ASCII module is a good example. The error messages and assigned ID's are held in a resource file, the ASCII one is here. It's short as there aren't many ASCII module messages. There's an ID and message for each error.

There's then a message constant class that loads up the resource errors, the ASCII one is here. This means that there's genuine constants for messages, and if there are any mistakes in IDs they'll be picked up when JHOVE's run, and by basic testing.

Finally, to raise the appropriate error see this example: https://github.com/openpreserve/jhove/blob/integration/jhove-modules/ascii-hul/src/main/java/edu/harvard/hul/ois/jhove/module/AsciiModule.java#L159

Any questions just raise them here, good luck.

rgfeldman added a commit to rgfeldman/jhove that referenced this issue Apr 10, 2019
carlwilson added a commit that referenced this issue Apr 29, 2019
@carlwilson carlwilson removed this from the Hack week tasks milestone Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New functionality to be developed P2 Medium priority issues to be scheduled in a future release
Projects
None yet
Development

No branches or pull requests

4 participants