title: how to catch "index out of range" exception in Qt
body: <p>how can I catch "index out of range" exception in Qt? I used the try/catch but looks like it's not working.</p>
  
  <pre><code>try {
      QStringList list;
      QString str = list[1];
  } catch (...) {
      qDebug()&lt;&lt;"error";
  }
  </code></pre>
  
  <p>From Windows XP, I can see below dialog pop up:</p>
  
  <pre><code>---------------------------
  K.exe - Application Error
  ---------------------------
  The instruction at "0x0040144c" referenced memory at "0x00040012". The memory could not be "written".
  
  
  Click on OK to terminate the program
  Click on CANCEL to debug the program
  ---------------------------
  OK   Cancel   
  ---------------------------
  </code></pre>
  
  <p>here is why I need to do this. Some of our not-so-experienced engineers need to use a smarll portion of Qt C++ language to do some automation test work. We can't force them to be using QList as an expreienced designer. So I'll try to catch and log the error so that their automation test script won't crash and easy to find out the bug spot. – zhongzhu yesterday </p>