Skip to content
Browse files

Reorder code so that the report is written to the error output before…

… we throw a failedAssertion error; this way the error port in the catch has something useful
  • Loading branch information
ndw committed Jul 30, 2015
1 parent f5e56f0 commit faea259dbfc2521afd752a408dcdc8669a07cd4c
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/main/java/com/xmlcalabash/library/
@@ -167,14 +167,17 @@ public void run() throws SaxonApiException {

XdmNode report = result.getXdmNode();

// Write the report before throwing an exception so that p:log on the validate
// step can do something useful.

boolean failedAsserts = checkFailedAssert(report);

if (failedAsserts && getOption(_assert_valid,false)) {
throw XProcException.stepError(54);


private boolean checkFailedAssert(XdmNode doc) {

0 comments on commit faea259

Please sign in to comment.
You can’t perform that action at this time.