throwin exception on any indexing error