private XQException convertXPathException(XPathException xpe) { XQException xqe; if (xpe.getErrorCodeQName() == null) { xqe = new XQException(xpe.getMessage()); } else { if (xpe.getLocator() == null) { xqe = new XQQueryException(xpe.getMessage(), xpe.getErrorCodeQName().toJaxpQName()); } else { xqe = new XQQueryException(xpe.getMessage(), xpe.getErrorCodeQName().toJaxpQName(), xpe.getLocator().getLineNumber(), xpe.getLocator().getColumnNumber(), 0); } } return xqe; }