Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Try catch doesn’t work...
Forum Updated to NodeBB v4.3 + New Features

Try catch doesn’t work...

Scheduled Pinned Locked Moved C++ Gurus
10 Posts 7 Posters 10.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Professionl
    wrote on last edited by
    #1

    Hi fox
    I've been used try/catch in my application, but it can't handle any error, my compiler is MinGW and Qt version is 4.8.2, I've been reconfigure qt with -exceptions, but not work...
    also, i want to handle SEH error,
    please help me to fix this problem
    Regard's

    [Moved to C++ Gurus -- mlong]

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      This is not a issue of Qt, try/catch designed to deal with C++ exceptions. You should not use them in other cases, such as SEH.

      Regards,

      1 Reply Last reply
      -1
      • T Offline
        T Offline
        tucnak
        wrote on last edited by
        #3

        At all, Qt doesn't support exceptions. They are making infrastructure ugly.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Tucnak: That is not correct. Qt does support exceptions, it just does not use them itself in most of its modules. There actually are some that require exceptions though.

          1 Reply Last reply
          0
          • G Offline
            G Offline
            giesbert
            wrote on last edited by
            #5

            [quote author="tucnak" date="1340967790"]They are making infrastructure ugly.[/quote]

            This is a matter of taste. I also does not like using exceptions for error handling, but I know many people that do. And they are no newbees or youngsters....

            Nokia Certified Qt Specialist.
            Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

            1 Reply Last reply
            0
            • sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              Sorry to interrupt, can someone enlighten me as to what is meant by "SEH error"? I think I've never seen that one before.

              (Z(:^

              1 Reply Last reply
              0
              • T Offline
                T Offline
                tucnak
                wrote on last edited by
                #7

                [quote author="Tobias Hunger" date="1340968157"]Tucnak: That is not correct. Qt does support exceptions, it just does not use them itself in most of its modules. There actually are some that require exceptions though.[/quote]

                Sorry, but I have never seen exceptions in Qt code. And there are no any examples with them.

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  dbzhang800
                  wrote on last edited by
                  #8

                  Hi sierdzio,

                  SEH means Structured Exception Handling, which is Windows only.

                  http://msdn.microsoft.com/en-us/library/windows/desktop/ms680657(v=vs.85).aspx

                  [quote author="sierdzio" date="1340970595"]Sorry to interrupt, can someone enlighten me as to what is meant by "SEH error"? I think I've never seen that one before.[/quote]

                  1 Reply Last reply
                  0
                  • sierdzioS Offline
                    sierdzioS Offline
                    sierdzio
                    Moderators
                    wrote on last edited by
                    #9

                    Ah, many thanks! That's probably why it was unknown to me.

                    Cheers, and carry on with your topic :)

                    (Z(:^

                    1 Reply Last reply
                    1
                    • B Offline
                      B Offline
                      broadpeak
                      wrote on last edited by
                      #10

                      I think, your original problem is not with MinGW and is not with Qt.
                      Exceptions are "only" ANSI/ISO C++ problem.
                      Probably you misunderstand with the exceptions itself.
                      There is a very good (imho: the best) and FREE book about C++ and of course about exceptions:
                      http://www.mindviewinc.com/downloads/TICPP-2nd-ed-Vol-two.zip
                      Read this :)

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved