Permalink
Browse files

Improved rendering of error messages for parsing functions.

  • Loading branch information...
1 parent 90810d4 commit 6a98d3ffa4a6b9c69c9403e2abafdaa9fefc177f @claudius108 claudius108 committed Mar 3, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/org/exist/xquery/functions/fn/ParsingFunctions.java
@@ -119,7 +119,7 @@ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathExce
} catch (final SAXException e) {
logger.debug("Error while parsing XML: " + e.getMessage(), e);
} catch (final IOException e) {
- throw new XPathException(this, ErrorCodes.FODC0006, "Error while parsing XML: " + e.getMessage(),
+ throw new XPathException(this, ErrorCodes.FODC0006, ErrorCodes.FODC0006.getDescription() + "\n" + e.getMessage(),
args[0], e);
}
@@ -139,7 +139,7 @@ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathExce
} else {
final MemTreeBuilder builder = context.getDocumentBuilder();
final NodeImpl result = Shared.writeReport(report, builder);
- throw new XPathException(this, ErrorCodes.FODC0006, report.toString(), result);
+ throw new XPathException(this, ErrorCodes.FODC0006, ErrorCodes.FODC0006.getDescription() + "\n" + report.toString(), result);
}
}
}

0 comments on commit 6a98d3f

Please sign in to comment.