Add exception index undefined in array