Results 1 to 2 of 2

Thread: Handling "index out of range"

  1. #1
    Join Date
    Oct 2010
    Posts
    11
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Handling "index out of range"

    hi all

    Is there a way to catch this exception (assuming i cant prevent it for some reason)

    Qt Code:
    1. QList<T>::operator[]: "index out of range"
    To copy to clipboard, switch view to plain text mode 

    is it possible to handle it using a catch statment?

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Handling "index out of range"

    It's not an exception, it's diagnostic data and only performed in debug mode. Build your app for release, and the check isn't performed (your app will probably just crash instead).

Similar Threads

  1. Proper handling "Cancel" click for QWizard
    By Splinter in forum Qt Programming
    Replies: 4
    Last Post: 17th September 2012, 15:34
  2. The "Range" option in QHttpRequestHeader
    By nhs_0702 in forum Qt Programming
    Replies: 1
    Last Post: 20th April 2010, 12:54
  3. The "Range" option in QHttpRequestHeader does not work?
    By nhs_0702 in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2010, 10:36
  4. setWritingSystem gives "out of range" error
    By jano_alex_es in forum Newbie
    Replies: 0
    Last Post: 2nd October 2009, 12:33
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.