Permalink
Browse files

Attempt to fix issue #249 by not masking the exception

  • Loading branch information...
ndw committed Jan 30, 2017
1 parent 00b95ff commit 42ddce911d0d1d35c2b271cef6e0aa652be056df
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/main/java/com/xmlcalabash/util/ProcessMatch.java
@@ -20,28 +20,28 @@
package com.xmlcalabash.util;
import java.net.URI;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
import com.xmlcalabash.core.XProcRuntime;
import com.xmlcalabash.core.XProcException;
import com.xmlcalabash.core.XProcRuntime;
import com.xmlcalabash.model.RuntimeValue;
import net.sf.saxon.Configuration;
import net.sf.saxon.event.NamespaceReducer;
import net.sf.saxon.event.PipelineConfiguration;
import net.sf.saxon.om.NamespaceResolver;
import net.sf.saxon.s9api.Axis;
import net.sf.saxon.s9api.SaxonApiException;
import net.sf.saxon.s9api.XdmDestination;
import net.sf.saxon.s9api.XdmNode;
import net.sf.saxon.s9api.XdmNodeKind;
import net.sf.saxon.s9api.XdmSequenceIterator;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.sxpath.XPathDynamicContext;
import net.sf.saxon.sxpath.XPathEvaluator;
import net.sf.saxon.sxpath.XPathExpression;
import net.sf.saxon.sxpath.XPathDynamicContext;
import net.sf.saxon.Configuration;
import net.sf.saxon.om.NamespaceResolver;
import net.sf.saxon.trans.XPathException;
import java.net.URI;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Vector;
/**
*
@@ -106,7 +106,7 @@ public void match(XdmNode doc, RuntimeValue match) {
if (e.getMessage() != null && e.getMessage().contains("syntax error")) {
throw XProcException.dynamicError(23,node,e,"Syntax error in match pattern: \"" + match.getString() + "\"");
} else {
throw XProcException.dynamicError(23,node,e,"Expression could not be evaluated: " + expr);
throw new XProcException(e);
}
}
}

0 comments on commit 42ddce9

Please sign in to comment.