ConsumerExceptionHandler implements ExceptionHandler<SofaTracerSpanEvent> { @Override public void handleOnShutdownException(Throwable ex) { SynchronizingSelfLog.error("Disruptor or AsyncConsumer occurs exception on shutdown", ex); }  @Override void handleEventException(Throwable ex, long sequence, SofaTracerSpanEvent event); @Override void handleOnStartException(Throwable ex); @Override void handleOnShutdownException(Throwable ex);  }
@Test public void handleOnShutdownException() throws IOException, InterruptedException { consumerExceptionHandler.handleOnShutdownException(new Throwable()); TestUtil.waitForAsyncLog(); File log = customFileLog("sync.log"); List<String> logs = FileUtils.readLines(log); assertTrue(logs.toString(), logs.get(0).contains("[ERROR]")); }