Here you can find the source of getMessage(XPathExpressionException e)
private static String getMessage(XPathExpressionException e)
//package com.java2s; //License from project: Apache License import javax.xml.xpath.XPathExpressionException; public class Main { private static String getMessage(XPathExpressionException e) { String msg;//from w w w. j av a 2 s . c o m Throwable t = e; do { msg = t.getMessage(); t = t.getCause(); } while (msg == null && t != null); return msg; } }