Catch a more specific exception in HistoryWrapper.java. The only possible exception that can be thrown here is IndexOutOfBoundsException.