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

Show pagination format error #5660

Merged
merged 2 commits into from
May 11, 2023

Conversation

pontus-osterdahl
Copy link
Contributor

This pull requests catches the number format exception when malformed pagination is attempted and displays a error message instead of the stacktrace.

  • Catch NumberFormatException and print error message
  • Add paginationFormatError message

Fixes #5658


* Catch NumberFormatException and print error message
* Add paginationFormatError message
Copy link
Member

@solth solth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request. It does indeed fix the linked issue (there is just one small error in the German translation).

This solution does emphasize the importance of fixing #3392, however, because the "Apply" button in the pagination panel is unreachable after closing the pagination start value error message. I guess the optimal solution would be to display any errors (pagination, validation or other errors) in a popup dialog instead, but that should probably be done when dealing with #3392.

Kitodo/src/main/resources/messages/errors_de.properties Outdated Show resolved Hide resolved
@pontus-osterdahl
Copy link
Contributor Author

Thanks for the review, comment and correction!
I was not aware of the issue with the "apply" button. I did my manual testing with both Metadata and Pagination panel open and here the apply button still appears after closing the error message. After minimizing the Metadata panel and closing the error message the button indeed disappears...

@pontus-osterdahl pontus-osterdahl requested a review from solth May 10, 2023 10:21
@solth solth merged commit 896e39b into kitodo:master May 11, 2023
@pontus-osterdahl pontus-osterdahl deleted the show-paginationformaterror branch May 11, 2023 11:50
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.

Stacktrace is displayed after pagination format error.
2 participants