Results 1 to 2 of 2

Thread: gcc exceptions

  1. #1
    Join Date
    Feb 2010
    Posts
    14
    Thanks
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default gcc exceptions

    Hi everybody,

    I try to get a simple try catch using (qt with) mingw including gcc 4.4.0 and it does not work

    Qt Code:
    1. try {
    2. throw std::logic_exception("error");
    3. } catch (const std::logic_exception& ex) {
    4. std::cout << ex.what();
    5. }
    6. catch (...) {
    7. std::cout << "bad";
    8. }
    To copy to clipboard, switch view to plain text mode 

    NO EXCEPTION IS CAUGHT!!! NEVER! Not even in the catch-all...

    program terminates ("terminate called after throwing instance of....")

    How do I catch these in gcc 4.4.0?? Is there a compiler flag or what???

    Thanks a million

    Chris

  2. #2
    Join Date
    Jul 2009
    Posts
    92
    Thanks
    7
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: gcc exceptions

    have you found a solution? I have the same problem...
    thanks

Similar Threads

  1. gcc exceptions
    By ctarsoaga in forum Qt Programming
    Replies: 0
    Last Post: 12th April 2010, 20:58
  2. Using exceptions with Qt
    By vu64 in forum Qt Programming
    Replies: 1
    Last Post: 17th May 2009, 03:28
  3. sql Exceptions
    By peace_comp in forum Qt Programming
    Replies: 2
    Last Post: 10th October 2008, 02:51
  4. QSA exceptions
    By seneca in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2006, 15:27
  5. QT and exceptions
    By krivenok in forum Qt Programming
    Replies: 4
    Last Post: 25th January 2006, 14:05

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.