From: bruce m. <tr...@us...> - 2004-07-28 21:44:27
|
Update of /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2964/modules/core/src/com/babeldoc/core Modified Files: LogService.java Log Message: 1. Fixed a logging error where an exception with no root cause prints no error 2. Fixed bad error messaging when bad pipeline or pipeline stage provided to process 3. Fixed a null pointer exception in XslTransform Stage where empty document causes NPE Index: LogService.java =================================================================== RCS file: /cvsroot/babeldoc/babeldoc/modules/core/src/com/babeldoc/core/LogService.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** LogService.java 23 Jul 2004 22:27:14 -0000 1.11 --- LogService.java 28 Jul 2004 21:44:18 -0000 1.12 *************** *** 207,211 **** /** * log an error condition. If debug is enabled, then print a stack ! * trace, otherwise just the exception. * * @param message log message --- 207,214 ---- /** * log an error condition. If debug is enabled, then print a stack ! * trace, otherwise just the exception. If debug is enabled, then ! * the full stack trace is printed. If debug not enabled, the root ! * cause of the exception message is just printed or if no root cause ! * then just the exception message. * * @param message log message *************** *** 213,237 **** */ public void logError(String message, Throwable e) { - Throwable rootcause = e==null?null:getRootCause(e); - if(logger.isDebugEnabled()) { ! logger.error(getClassMethod(3) + message, rootcause); } else { ! String rootCauseMsg = rootcause==null?"":rootcause.getMessage(); ! logger.error(message+rootCauseMsg); } } /** ! * log an error condition * * @param e exception that caused this log */ public void logError(Throwable e) { ! // if(logger.isDebugEnabled()) { ! // logger.error(getClassMethod(3), getRootCause(e)); ! // } else { ! logger.error(getRootCause(e)); ! // } } --- 216,236 ---- */ public void logError(String message, Throwable e) { if(logger.isDebugEnabled()) { ! logger.error(getClassMethod(3) + message, e); } else { ! Throwable rootcause = e==null?null:getRootCause(e); ! Throwable reportException = rootcause!=null?rootcause:e; ! String exceptMsg = reportException==null?"":reportException.getMessage(); ! logger.error(message+exceptMsg); } } /** ! * log an error condition. * * @param e exception that caused this log */ public void logError(Throwable e) { ! this.logError("", e); } |