Catching Exception for ArrayOutOfBoundsException