Fix a bug in the XPathException(Throwable) constructor.
Pass the message from the cause Throwable to the super constructor, so that the getMessage() method on this XPathException would return the message of the cause. git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226234 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -63,7 +63,7 @@ public class XPathException extends Exception {
|
||||
* @throws NullPointerException if <code>cause</code> is <code>null</code>.
|
||||
*/
|
||||
public XPathException(Throwable cause) {
|
||||
super();
|
||||
super(cause == null ? null : cause.toString());
|
||||
this.cause = cause;
|
||||
if ( cause == null ) {
|
||||
throw new NullPointerException ( "cause can't be null");
|
||||
|
||||
Reference in New Issue
Block a user