@SuppressWarnings("unchecked") @Override public void onWriteError(Exception exception, List<? extends S> items) { try { delegate.onWriteError((List<Object>) items, exception); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Test(expected=BatchRuntimeException.class) public void testOnWriteErrorException() throws Exception { Exception cause = new Exception("cause"); doThrow(new Exception("expected")).when(delegate).onWriteError(items, cause); adapter.onWriteError(cause, items); } }
@Test public void testOnWriteError() throws Exception { Exception cause = new Exception("cause"); adapter.onWriteError(cause, items); verify(delegate).onWriteError(items, cause); }
@SuppressWarnings("unchecked") @Override public void onWriteError(Exception exception, List<? extends S> items) { try { delegate.onWriteError((List<Object>) items, exception); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@SuppressWarnings("unchecked") @Override public void onWriteError(Exception exception, List<? extends S> items) { try { delegate.onWriteError((List<Object>) items, exception); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@SuppressWarnings("unchecked") @Override public void onWriteError(Exception exception, List<? extends S> items) { try { delegate.onWriteError((List<Object>) items, exception); } catch (Exception e) { throw new BatchRuntimeException(e); } } }
@Override public void onWriteError(List items, Exception ex) { try { this.delegate.onWriteError(items, ex); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } }
@Override public void onWriteError(List items, Exception ex) { try { this.delegate.onWriteError(items, ex); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } }
@Override public void onWriteError(List items, Exception ex) { try { this.delegate.onWriteError(items, ex); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } }
l.onWriteError(outputList, e);
for (ItemWriteListener writeListenerProxy : itemWriteListeners) { try { writeListenerProxy.onWriteError(theChunk, e); } catch (Exception e1) { ExceptionConfig.wrapBatchException(e1);