Permalink
Browse files

Merge pull request #161 from claudius108/develop

Improved rendering of error messages for parsing functions.
  • Loading branch information...
2 parents 90810d4 + 09fc677 commit 07a51f6941fd4e086df506af5df85e0571a6bdff @dizzzz dizzzz 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() + ": " + 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() + ": " + report.toString(), result);
}
}
}

0 comments on commit 07a51f6

Please sign in to comment.