Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Ignore ASSERT Dialog?

Ignore ASSERT Dialog?

Scheduled Pinned Locked Moved C / C++ / MFC
questiondebugginghelp
7 Posts 4 Posters 0 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.
  • B Offline
    B Offline
    Blue Bird
    wrote on last edited by
    #1

    I Want to ignore ASSERT Dialog on DEBUG mode using try ~ catch. How can i do it? :confused: help me pelase... And sorry for my little English. thanks..

    C B 3 Replies Last reply
    0
    • B Blue Bird

      I Want to ignore ASSERT Dialog on DEBUG mode using try ~ catch. How can i do it? :confused: help me pelase... And sorry for my little English. thanks..

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can't, they are different beasts. You can redefine the ASSERT macro, I suppose. Christian Graus - Microsoft MVP - C++

      A 1 Reply Last reply
      0
      • C Christian Graus

        You can't, they are different beasts. You can redefine the ASSERT macro, I suppose. Christian Graus - Microsoft MVP - C++

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        I think you are confusing ASSERT (dialog which comes up due to statements like ASSERT(FALSE) ) and a crash dialog. ASSERT are more of a programmers tool to announce that something is wrong. If you dont want to have ASSERT coming up for an expression evaluating to be FALSE, then just remove them. Simple. And if you are interested in handling crashes gracefully, then you should have something like try { // Code resulting in probable crash. } catch(...) { }

        C 1 Reply Last reply
        0
        • A Anonymous

          I think you are confusing ASSERT (dialog which comes up due to statements like ASSERT(FALSE) ) and a crash dialog. ASSERT are more of a programmers tool to announce that something is wrong. If you dont want to have ASSERT coming up for an expression evaluating to be FALSE, then just remove them. Simple. And if you are interested in handling crashes gracefully, then you should have something like try { // Code resulting in probable crash. } catch(...) { }

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Possibly a good answer, but you gave it to the wrong person. Christian Graus - Microsoft MVP - C++

          A 1 Reply Last reply
          0
          • B Blue Bird

            I Want to ignore ASSERT Dialog on DEBUG mode using try ~ catch. How can i do it? :confused: help me pelase... And sorry for my little English. thanks..

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Thinking about it furhter - I assume this means you get an ASSERT message in your code when you call an MFC or other function ? You should fix your code, not try to get rid of the ASSERT, which is simply warning you of a problem that will continue to exist. Christian Graus - Microsoft MVP - C++

            1 Reply Last reply
            0
            • C Christian Graus

              Possibly a good answer, but you gave it to the wrong person. Christian Graus - Microsoft MVP - C++

              A Offline
              A Offline
              Alex Korchemniy
              wrote on last edited by
              #6

              >> wrong person Poor you. :laugh: I've seen this like 10 times already. Alex Korchemniy

              1 Reply Last reply
              0
              • B Blue Bird

                I Want to ignore ASSERT Dialog on DEBUG mode using try ~ catch. How can i do it? :confused: help me pelase... And sorry for my little English. thanks..

                B Offline
                B Offline
                Blue Bird
                wrote on last edited by
                #7

                thanks for answers. in fack, I have errors that can't know problem. so, I want to show error dialog that I made, instead of ASSERT message. How can catch ASSERT message in advance? This week is dead line of my project. help me, please... and sorry for my little English. Finally, have a nice day! Thanks...

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups