ArrayIndexOutOfBoundsException try catch