DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=33446>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33446 ------- Additional Comments From [EMAIL PROTECTED] 2005-02-08 23:17 ------- Something logging in XML should know that it is illegal to omit a value from an attribute. The XML Logger adds the following attributes: buildElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime)); buildElement.element.setAttribute(ERROR_ATTR, event.getException().toString()); An Exception, being a Throwable MUST NOT return null on toString, as this breaches the contract of toString on a Throwable, formatTime should not be returning null either. How can this error be reproduced (Or could you adapt XmlLogger to give some info in case the event.getException().toString() returns null, to know which exception class is broken.) To check this please replace the start of the buildFinished method in the XmlLogger class: public void buildFinished(BuildEvent event) { long totalTime = System.currentTimeMillis() - buildElement.startTime; buildElement.element.setAttribute(TIME_ATTR, DefaultLogger.formatTime(totalTime)); if (event.getException() != null) { String temp = event.getException().toString(); temp = ((temp != null) ? temp : "Throwable with incorrect toString(): " + event.getException().getClass().toString()); buildElement.element.setAttribute(ERROR_ATTR, temp); // print the stacktrace in the build file it is always useful... // better have too much info than not enough. Throwable t = event.getException(); Text errText = doc.createCDATASection(StringUtils.getStackTrace(t)); Element stacktrace = doc.createElement(STACKTRACE_TAG); stacktrace.appendChild(errText); buildElement.element.appendChild(stacktrace); } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]