Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. Can Qt Creator warn about unhandled exception
Forum Updated to NodeBB v4.3 + New Features

Can Qt Creator warn about unhandled exception

Scheduled Pinned Locked Moved Solved Qt Creator and other tools
4 Posts 3 Posters 609 Views 2 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.
  • djentxD Offline
    djentxD Offline
    djentx
    wrote on last edited by
    #1

    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.

    kshegunovK 1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

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

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • djentxD djentx

        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.

        kshegunovK Offline
        kshegunovK Offline
        kshegunov
        Moderators
        wrote on last edited by kshegunov
        #3

        @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
        3
        • djentxD Offline
          djentxD Offline
          djentx
          wrote on last edited by
          #4

          Thanks for you two.

          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