Update of /cvsroot/displaytag/display09/src/org/displaytag/exception In directory sc8-pr-cvs1:/tmp/cvs-serv21814/src/org/displaytag/exception
Modified Files: BaseNestableJspTagException.java Log Message: Do not log an exception in the constructor. Do it at printStackTrace. Need to improve exception handling some more. Index: BaseNestableJspTagException.java =================================================================== RCS file: /cvsroot/displaytag/display09/src/org/displaytag/exception/BaseNestableJspTagException.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BaseNestableJspTagException.java 29 Jun 2003 21:40:31 -0000 1.2 --- BaseNestableJspTagException.java 9 Jul 2003 12:59:49 -0000 1.3 *************** *** 13,17 **** public abstract class BaseNestableJspTagException extends JspTagException { - /** * Class where the exception has been generated --- 13,16 ---- *************** *** 33,60 **** super(pMessage); mSourceClass = pSourceClass; - - // log exception - Log lLog = LogFactory.getLog(pSourceClass); - lLog.error(toString()); - - // choose appropriate logging method - if (getSeverity() == SeverityEnum.DEBUG) - { - lLog.debug(toString()); - } - else if (getSeverity() == SeverityEnum.INFO) - { - lLog.info(toString()); - } - else if (getSeverity() == SeverityEnum.WARN) - { - lLog.warn(toString()); - } - else - { - // error - default - lLog.error(toString()); - } - } --- 32,35 ---- *************** *** 70,106 **** mSourceClass = pSourceClass; mCause = pCause; ! // log exception ! Log lLog = LogFactory.getLog(pSourceClass); // choose appropriate logging method if (getSeverity() == SeverityEnum.DEBUG) { ! lLog.debug(toString(), pCause); } else if (getSeverity() == SeverityEnum.INFO) { ! lLog.info(toString(), pCause); } else if (getSeverity() == SeverityEnum.WARN) { ! lLog.warn(toString(), pCause); } else { // error - default ! lLog.error(toString(), pCause); } ! ! } ! ! /** ! * returns the previous exception ! * @return Throwable previous exception ! */ ! public Throwable getCause() ! { ! return mCause; ! } /** --- 45,83 ---- mSourceClass = pSourceClass; mCause = pCause; + } ! /** ! * returns the previous exception ! * @return Throwable previous exception ! */ ! public Throwable getCause() ! { ! return mCause; ! } ! ! public void printStackTrace() { ! // log exception ! Log lLog = LogFactory.getLog(mSourceClass); ! lLog.error(toString()); // choose appropriate logging method if (getSeverity() == SeverityEnum.DEBUG) { ! lLog.debug(toString()); } else if (getSeverity() == SeverityEnum.INFO) { ! lLog.info(toString()); } else if (getSeverity() == SeverityEnum.WARN) { ! lLog.warn(toString()); } else { // error - default ! lLog.error(toString()); } ! } /** ------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps _______________________________________________ displaytag-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/displaytag-devel