title: ArrayIndexOutOfBoundsException not being caught and ignored
body: <p>I want to catch and ignore and ArrayIndexOutOfBoundsException error (basically it's not something I have control over, so I need my program to keep chugging along).</p>
  
  <p>However my try/catch pair doesn't seem to catch the exception and ignore it. Hopefully you can pick out what I am doing wrong.</p>
  
  <p>The exception occurs at this line<br></p>
  
  <blockquote>
    <p>content = extractor.getTextFromPage(page);</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>for(int page=1;page&lt;=noPages;page++){
      try{
          System.out.println(page);           
          content = extractor.getTextFromPage(page);
          }
      }   
      catch (ArrayIndexOutOfBoundsException e){
      System.out.println("This page  can't be read");
      }    
  }
  </code></pre>
  
  <p><i>
  Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Invalid index: 02
      at com.lowagie.text.pdf.CMapAwareDocumentFont.decodeSingleCID(Unknown Source)
      at com.lowagie.text.pdf.CMapAwareDocumentFont.decode(Unknown Source)
      at com.lowagie.text.pdf.parser.PdfContentStreamProcessor.decode(Unknown Source)
      at com.lowagie.text.pdf.parser.PdfContentStreamProcessor.displayPdfString(Unknown Source)
      at com.lowagie.text.pdf.parser.PdfContentStreamProcessor$ShowText.invoke(Unknown Source)
      at com.lowagie.text.pdf.parser.PdfContentStreamProcessor.invokeOperator(Unknown Source)
      at com.lowagie.text.pdf.parser.PdfContentStreamProcessor.processContent(Unknown Source)
      at com.lowagie.text.pdf.parser.PdfTextExtractor.getTextFromPage(Unknown Source)
      at com.pdfextractor.main.Extractor.main(Extractor.java:64)
  </i></p>
  
  <p><b>edit:</b> I have put the try/catch within the for loop <br>and added the stack trace <br>and removed index=1</p>