Example usage for org.apache.ibatis.parsing ParsingException ParsingException

List of usage examples for org.apache.ibatis.parsing ParsingException ParsingException

Introduction

In this page you can find the example usage for org.apache.ibatis.parsing ParsingException ParsingException.

Prototype

public ParsingException(String message, Throwable cause) 

Source Link

Usage

From source file:com.ibatis.common.util.NodeEventParser.java

License:Apache License

public void parse(Reader reader) throws ParsingException {
    try {/*from w  w  w  .ja  v  a 2 s.co  m*/
        Document doc = createDocument(reader);
        xpathParser = new XPathParser(doc, validation, variables, entityResolver);
        parse(doc.getLastChild());
    } catch (Exception e) {
        throw new ParsingException("Error parsing XML.  Cause: " + e, e);
    }
}

From source file:com.ibatis.common.util.NodeEventParser.java

License:Apache License

private void processNodelet(Node node, String pathString) {
    NodeEventWrapper nodelet = (NodeEventWrapper) nodeletMap.get(pathString);
    if (nodelet != null) {
        try {/*from w ww  .  j  a  va  2s  .  co m*/
            nodelet.process(new XNode(xpathParser, node, variables));
        } catch (Exception e) {
            throw new ParsingException("Error parsing XPath '" + pathString + "'.  Cause: " + e, e);
        }
    }
}

From source file:com.ibatis.common.util.NodeEventWrapper.java

License:Apache License

public void process(XNode context) {
    try {/*  w w  w .j a  v  a  2  s .c  o  m*/
        method.invoke(nodeletTarget, new Object[] { context });
    } catch (Exception e) {
        throw new ParsingException("Error processing node " + context.getNode().getNodeName() + ". Cause: " + e,
                e);
    }
}