@Test public void handleEventExceptionWithEventNull() throws IOException, InterruptedException { stringConsumerExceptionHandler.handleEventException(new Throwable(), 2, null); Assert.assertTrue(checkFileContainError()); }
@Override public void handleEventException(Throwable ex, long sequence, StringEvent event) { if (event != null) { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is[" + event.getString() + "]", ex); } else { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is null", ex); } }
StringConsumerExceptionHandler implements ExceptionHandler<StringEvent> { @Override public void handleEventException(Throwable ex, long sequence, StringEvent event) { if (event != null) { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is[" + event.getString() + "]", ex); } else { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is null", ex); } } }
StringConsumerExceptionHandler implements ExceptionHandler<StringEvent> { @Override public void handleEventException(Throwable ex, long sequence, StringEvent event) { if (event != null) { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is[" + event.getString() + "]", ex); } else { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is null", ex); } }  }
StringConsumerExceptionHandler implements ExceptionHandler<StringEvent> { @Override public void handleEventException(Throwable ex, long sequence, StringEvent event) { if (event != null) { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is[" + event.getString() + "]", ex); } else { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is null", ex); } }  @Override void handleEventException(Throwable ex, long sequence, StringEvent event); @Override void handleOnStartException(Throwable ex); @Override void handleOnShutdownException(Throwable ex); }
StringConsumerExceptionHandler implements ExceptionHandler<StringEvent> { @Override public void handleEventException(Throwable ex, long sequence, StringEvent event) { if (event != null) { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is[" + event.getString() + "]", ex); } else { SynchronizingSelfLog.error( "AsyncConsumer occurs exception during handle StringEvent, The string is null", ex); } }  @Override void handleEventException(Throwable ex, long sequence, StringEvent event); @Override void handleOnStartException(Throwable ex); @Override void handleOnShutdownException(Throwable ex);  }