Skip to content

Commit

Permalink
Throw SAXException from MarkdownReader
Browse files Browse the repository at this point in the history
Signed-off-by: Jarno Elovirta <jarno@elovirta.com>
  • Loading branch information
jelovirt committed Nov 2, 2023
1 parent 338a249 commit e0e17ae
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/com/elovirta/dita/markdown/MarkdownReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,11 @@ public void parse(final InputSource input) throws IOException, SAXException {
final MarkdownParser markdownParser = getParser(schema);
markdownParser.setContentHandler(contentHandler);
markdownParser.setErrorHandler(errorHandler);
markdownParser.convert(sequence, Optional.ofNullable(input.getSystemId()).map(URI::create).orElse(null));
try {
markdownParser.convert(sequence, Optional.ofNullable(input.getSystemId()).map(URI::create).orElse(null));
} catch (ParseException e) {
throw new SAXException(e);
}
}

@Override
Expand Down

0 comments on commit e0e17ae

Please sign in to comment.