Skip to content

Commit

Permalink
[fix] handle IllegalStateException in file:list#2
Browse files Browse the repository at this point in the history
fixes eXist-db#5028

The Java code of DirectoryList can throw an IllegalStateException
when a non-existent directory is supplied as its first argument.
This exception class is now handled in file:list#2.
  • Loading branch information
line-o committed Oct 16, 2023
1 parent 9abcd16 commit 6f932b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public Sequence eval(final Sequence[] args, final Sequence contextSequence) thro
builder.endElement();

return (NodeValue) builder.getDocument().getDocumentElement();
} catch (final IOException e) {
} catch (final IOException | IllegalStateException e) {
throw new XPathException(this, e.getMessage());
} finally {
context.popDocumentContext();
Expand Down

0 comments on commit 6f932b1

Please sign in to comment.