Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. try catch doesn't work
Forum Updated to NodeBB v4.3 + New Features

try catch doesn't work

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 864 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.
  • D Offline
    D Offline
    Dohisev
    wrote on last edited by
    #1

    I don't know why but I created a class that inherits from QException and created a constructor with QByteArray and override the what method, it compile just fine but when I try to catch the message from the exception class I created it doesn't work, my application just crashes and that is it, no message from qDebug that I put on the catch block appear and if I compile and run as debug mode it appears a message saying "abort() has been called" (something like that).

    What might be happening?

    jsulmJ 1 Reply Last reply
    0
    • 6thC6 Offline
      6thC6 Offline
      6thC
      wrote on last edited by
      #2

      Have you implemented QException correctly?
      How many bytes are you trying to store in your QByteArray?

      1 Reply Last reply
      0
      • D Dohisev

        I don't know why but I created a class that inherits from QException and created a constructor with QByteArray and override the what method, it compile just fine but when I try to catch the message from the exception class I created it doesn't work, my application just crashes and that is it, no message from qDebug that I put on the catch block appear and if I compile and run as debug mode it appears a message saying "abort() has been called" (something like that).

        What might be happening?

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Dohisev It would help a lot if you would post relevant code.

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        1

        • Login

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