Project

Profile

Help

Revision d36c5973

Added by Michael Kay over 12 years ago

Fix bug 2694546 - unconditional stack trace when extension function throws exception

View differences:

latest9.1/bj/net/sf/saxon/functions/ExtensionFunctionCall.java
220 220
        for (int i=0; i<argValues.length; i++) {
221 221
            argValues[i] = ExpressionTool.lazyEvaluate(argument[i], context, 1);
222 222
        }
223
        try {
223
//        try {
224 224
            return call(argValues, context);
225
        } catch (XPathException err) {
226
            err.printStackTrace();
227
            String msg = err.getMessage();
228
            msg = "Error in call to extension function {" + theMethod.toString() + "}: " + msg;
229
            XPathException err2 = new XPathException(msg, err.getException());
230
            err2.setXPathContext(context);
231
            err2.setLocator(this);
232
            err2.setErrorCode(err.getErrorCodeNamespace(), err.getErrorCodeLocalPart());
233
            throw err2;
234
        }
225
//        } catch (XPathException err) {
226
//            err.printStackTrace();
227
//            String msg = err.getMessage();
228
//            msg = "Error in call to extension function {" + theMethod.toString() + "}: " + msg;
229
//            XPathException err2 = new XPathException(msg, err.getException());
230
//            err2.setXPathContext(context);
231
//            err2.setLocator(this);
232
//            err2.setErrorCode(err.getErrorCodeNamespace(), err.getErrorCodeLocalPart());
233
//            throw err2;
234
//        }
235 235
    }
236 236

  
237 237
    /**

Also available in: Unified diff