Code:
public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException {
final int maximum = manager.getMaxNumberIgnoredExceptions();
if (skipCount == maximum) {
logger.debug("Skip count reached: " + maximum);
throw new SkipLimitExceededException(maximum, t);
} else {
BatchExceptionType type = manager.getExceptionType(t);
switch (type) {
case FATAL_EXCEPTION:
logger.debug("It's fatal, so NO SKIP. Skip count = " + skipCount + ". Maximum items skipped= " + maximum);
return false;
case NON_IGNORABLE_EXCEPTION:
logger.debug("It's non ignorable, so NO SKIP. Skip count = " + skipCount + ". Maximum items skipped= " + maximum);
return false;
case IGNORABLE_EXCEPTION:
logger.debug("It's ignorable, so SKIP. Skip count = " + skipCount + ". Maximum items skipped= " + maximum);
return true;
default:
throw new RuntimeException("Exception type not recognized : " + type);
}
}
}
The skip limit i.e., getMaxNumberIgnoredExceptions() is set by default to 50