From cdcdeab0aecd7dbcaea00bd6797713bb2b9f5d0c Mon Sep 17 00:00:00 2001 From: mkwan Date: Tue, 14 Jun 2005 19:19:27 +0000 Subject: [PATCH] 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 --- java/external/src/javax/xml/xpath/XPathException.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/external/src/javax/xml/xpath/XPathException.java b/java/external/src/javax/xml/xpath/XPathException.java index 17d94a7..a0b5463 100644 --- a/java/external/src/javax/xml/xpath/XPathException.java +++ b/java/external/src/javax/xml/xpath/XPathException.java @@ -63,7 +63,7 @@ public class XPathException extends Exception { * @throws NullPointerException if cause is null. */ 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");