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:
parent
e58a70e3ee
commit
cdcdeab0ae
@ -63,7 +63,7 @@ public class XPathException extends Exception {
|
|||||||
* @throws NullPointerException if <code>cause</code> is <code>null</code>.
|
* @throws NullPointerException if <code>cause</code> is <code>null</code>.
|
||||||
*/
|
*/
|
||||||
public XPathException(Throwable cause) {
|
public XPathException(Throwable cause) {
|
||||||
super();
|
super(cause == null ? null : cause.toString());
|
||||||
this.cause = cause;
|
this.cause = cause;
|
||||||
if ( cause == null ) {
|
if ( cause == null ) {
|
||||||
throw new NullPointerException ( "cause can't be null");
|
throw new NullPointerException ( "cause can't be null");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user