You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-cvs@xml.apache.org by mk...@apache.org on 2005/06/14 21:19:27 UTC
cvs commit: xml-commons/java/external/src/javax/xml/xpath XPathException.java
mkwan 2005/06/14 12:19:27
Modified: java/external/src/javax/xml/xpath XPathException.java
Log:
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.
Revision Changes Path
1.2 +3 -3 xml-commons/java/external/src/javax/xml/xpath/XPathException.java
Index: XPathException.java
===================================================================
RCS file: /home/cvs/xml-commons/java/external/src/javax/xml/xpath/XPathException.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- XPathException.java 8 Apr 2005 10:39:14 -0000 1.1
+++ XPathException.java 14 Jun 2005 19:19:27 -0000 1.2
@@ -63,7 +63,7 @@
* @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");