void addExceptionEvent(final Throwable ex) { this.auditLog.add(new ExceptionEvent(ex, new Date())); }
LOGGER.error("Uncatched Throwable detected", throwable); } else { delegate(new ExceptionEvent(throwable)); if (event.isConsumed()) { break;
@Test public void testGetCause() { final NullPointerException npe = new NullPointerException("npe"); ExceptionEvent ee = new ExceptionEvent(npe); Assert.assertSame(npe, ee.getCause()); ee = new ExceptionEvent(npe, new Date()); Assert.assertSame(npe, ee.getCause()); }
@Test public void testGetTimestamp() { final NullPointerException npe = new NullPointerException("npe"); ExceptionEvent ee = new ExceptionEvent(npe); Assert.assertNotNull(ee.getTimestamp()); ee = new ExceptionEvent(npe, new Date(1234567890L)); Assert.assertEquals(new Date(1234567890L), ee.getTimestamp()); }
void addExceptionEvent(final Throwable ex) { this.auditLog.add(new ExceptionEvent(ex, new Date())); }
@Test public void testToString() { Assert.assertNotNull(new ExceptionEvent(new NullPointerException())); }