Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    Solved Can Qt Creator warn about unhandled exception

    Tools
    3
    4
    345
    Loading More Posts
    • 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.
    • djentx
      djentx last edited by

      Hello, sorry for bad english.

      I've seen that Qt Creator now warn about a lot of things in real time.

      Is there a way to set Qt Creator to warn about unhandled exception, when i call a function that may throw un exception without a try catch ?

      Thanks a lot, have a nice day.

      kshegunov 1 Reply Last reply Reply Quote 0
      • Christian Ehrlicher
        Christian Ehrlicher Lifetime Qt Champion last edited by

        Since all functions can throw an exception when they are not marked as nothrow I think this would create a lot of warnings...

        Qt has to stay free or it will die.

        1 Reply Last reply Reply Quote 2
        • kshegunov
          kshegunov Moderators @djentx last edited by kshegunov

          @djentx said in Can Qt Creator warn about unhandled exception:

          Is there a way to set Qt Creator to warn about unhandled exception, when i call a function that may throw un exception without a try catch ?

          No, and it shouldn't. A function isn't obligated to catch the exception! You may have an exception thrown 3-4-5 calls deep that is caught only at the bottom-most stack frame, and this is valid. Creator can't, nor should, know what you intend(ed) to do.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply Reply Quote 3
          • djentx
            djentx last edited by

            Thanks for you two.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post