Index: C:/workplace/.eclipse/thorn-workspace/castor/src/main/java/org/exolab/castor/xml/XMLException.java =================================================================== --- C:/workplace/.eclipse/thorn-workspace/castor/src/main/java/org/exolab/castor/xml/XMLException.java (revision 6760) +++ C:/workplace/.eclipse/thorn-workspace/castor/src/main/java/org/exolab/castor/xml/XMLException.java (working copy) @@ -148,16 +148,19 @@ * @return the String representation of this Exception. **/ public String toString() { - String message; - - Throwable t = getCause(); - if (t==null) - message = getMessage(); - else - message = t.getMessage(); + StringBuffer buff = new StringBuffer(); + buff.append(this.getClass().getName()); + + String msg = this.getMessage(); + if (msg != null) { + buff.append(": ").append(msg); + } + + if (this._location != null) { + buff.append("{").append(this._location).append("}"); + } - if (_location == null) return message; - return message + "{" + _location.toString() + "}"; + return buff.toString(); } //-- toString /**