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. Catch(exception)

Catch(exception)

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelp
5 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.
  • N Offline
    N Offline
    NewVC
    wrote on last edited by
    #1

    Hi All How can i Use AfxmessBox through Catch(exception)?Plz help me i have code like this

    try{
    //Something here
    }
    catch(exception er)
    {
    AfxmessBox(er)
    }

    Plz help me

    C 1 Reply Last reply
    0
    • N NewVC

      Hi All How can i Use AfxmessBox through Catch(exception)?Plz help me i have code like this

      try{
      //Something here
      }
      catch(exception er)
      {
      AfxmessBox(er)
      }

      Plz help me

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      By calling exception::what() maybe ?

      try
      {
      //Something here
      }
      catch(exception er)
      {
      AfxmessBox(er.what());
      }

      Cédric Moonen Software developer
      Charting control [v1.5] OpenGL game tutorial in C++

      Y T 2 Replies Last reply
      0
      • C Cedric Moonen

        By calling exception::what() maybe ?

        try
        {
        //Something here
        }
        catch(exception er)
        {
        AfxmessBox(er.what());
        }

        Cédric Moonen Software developer
        Charting control [v1.5] OpenGL game tutorial in C++

        Y Offline
        Y Offline
        Yusuf
        wrote on last edited by
        #3

        Cedric Moonen wrote:

        try{ //Something here}catch(exception er){ AfxmessBox(er.what());}

        plz hlp. i m getting err. ERROR - 404 - Undefined Method 'AfxmessBox' - txtpsk detected!!!!!! what is next, kidz coding in txtspk :rolleyes: :wtf: :omg: X|

        Yusuf Oh didn't you notice, analogous to square roots, they recently introduced rectangular, circular, and diamond roots to determine the size of the corresponding shapes when given the area. Luc Pattyn[^]

        1 Reply Last reply
        0
        • C Cedric Moonen

          By calling exception::what() maybe ?

          try
          {
          //Something here
          }
          catch(exception er)
          {
          AfxmessBox(er.what());
          }

          Cédric Moonen Software developer
          Charting control [v1.5] OpenGL game tutorial in C++

          T Offline
          T Offline
          ThatsAlok
          wrote on last edited by
          #4

          Cedric Moonen wrote:

          AfxmessBox(er.what());

          New Api i think :-)... I think this must be AfxMessageBox()

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
          Never mind - my own stupidity is the source of every "problem" - Mixture

          cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

          C 1 Reply Last reply
          0
          • T ThatsAlok

            Cedric Moonen wrote:

            AfxmessBox(er.what());

            New Api i think :-)... I think this must be AfxMessageBox()

            "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
            Never mind - my own stupidity is the source of every "problem" - Mixture

            cheers, Alok Gupta VC Forum Q&A :- I/IV Support CRY- Child Relief and You

            C Offline
            C Offline
            Cedric Moonen
            wrote on last edited by
            #5

            Yeah, but I just copy/pasted his code :) Programmers are lazy you know...

            Cédric Moonen Software developer
            Charting control [v1.5] OpenGL game tutorial in C++

            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