Use a dummy exception class when calling log(exception). This makes the unit test output less confusing.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/logging/trunk@563165 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Kitching committed 2007-08-06 15:08:05 +00:00
1 parent 58eff81387
commit b310a4ef0e
4 files changed
+35 -3

No files matched your search

@@ -27,6 +27,7 @@ import java.util.List;
import junit.framework.TestCase;
import org.apache.commons.logging.DummyException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -204,7 +205,7 @@ public abstract class StandardTests extends TestCase {
* Log messages with exceptions
*/
private void logExceptionMessages(Log log) {
Throwable t = new IndexOutOfBoundsException();
Throwable t = new DummyException();
log.trace("trace", t); // Should not actually get logged
log.debug("debug", t); // Should not actually get logged
log.info("info", t);