@Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { if(!enable) return false; if (t instanceof org.springframework.batch.item.file.FlatFileParseException) { String msg = t.getMessage(); int i= msg.indexOf(tag); msg = msg.substring(i+tag.length(),msg.length()-1); LogUtil.getMqSyncLog().error(msg); LogUtil.getMqSyncLog().debug(msg,t); return true; } else return false; }
@Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { if (t instanceof CustomSkipableException && skipCount <= skipLimit) { return true; } else { return false; } }
@Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { if (t instanceof TaxWebServiceNonFatalException || t instanceof EmailSenderException) { if (skipCount >= (totalSkipLimit - 1)) { throw new SkipLimitExceededException(totalSkipLimit, t); } return true; } return false; }
@Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { return (t instanceof CcjImportProcessSkippableException || /* * Handle situation when two or more versions of raw judgment * are being processed in same chunk. * As result of skipping this exception chunk will be divided into * small one element chunks which will be processed correctly. * * For more info check: https://github.com/CeON/saos/issues/468 */ (t instanceof PersistenceException && t.getCause() instanceof ConstraintViolationException)); }
@Override public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException { return exceptionClassToSkip.isAssignableFrom(t.getClass()); }