/** * Create a new XPathSyntaxException wrapping an existing * <code>org.jaxen.saxpath.XPathSyntaxException</code>. * * @param e the exception that caused this exception */ public XPathSyntaxException(org.jaxen.saxpath.XPathSyntaxException e) { super( e ); this.xpath = e.getXPath(); this.position = e.getPosition(); }
/** * <p> * Returns a string in the form <code>" ^"</code> which, when placed on the line * below the XPath expression in a monospaced font, should point to the * location of the error. * </p> * * @return the position marker */ private String getPositionMarker() { int pos = getPosition(); StringBuffer buf = new StringBuffer(pos+1); for ( int i = 0 ; i < pos ; ++i ) { buf.append(" "); } buf.append("^"); return buf.toString(); }
public String toString() { return getClass() + ": " + getXPath() + ": " + getPosition() + ": " + getMessage(); }