Skip to content

Commit

Permalink
Merge pull request #921 from karenhanson/epub-error-messages
Browse files Browse the repository at this point in the history
Fixes unhandled fatal error when EPUB content.opf date is badly formatted.
  • Loading branch information
carlwilson authored Aug 13, 2024
2 parents 8209f27 + d9cd0c0 commit 93c9fd8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,7 @@ private static Date toDate(String isoDate) {
if (isoDate == null || isoDate.length() == 0) {
return null;
}
isoDate = isoDate.trim();

SimpleDateFormat simpleDateFormat = new SimpleDateFormat(ISO_DATE_PATTERN);
Date date;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
EPUB-PTC-1 = FATAL, [An error occurred.]
EPUB-PTC-1-SUB = Exception: %s
EPUB-PTC-1 = FATAL, [An error occurred.]
EPUB-PTC-1-SUB = Exception: %s
EPUB-PTC-2 = FATAL, [An undefined error occurred. This may be caused by a system error or indicative of a problem with the file provided.]

0 comments on commit 93c9fd8

Please sign in to comment.