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. [Message Deleted]

[Message Deleted]

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

    [Message Deleted]

    C Z T H 4 Replies Last reply
    0
    • K KKumarTG

      [Message Deleted]

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

      Yes, it's called a debugger :rolleyes:


      Cédric Moonen Software developer
      Charting control [Updated - v1.1]

      1 Reply Last reply
      0
      • K KKumarTG

        [Message Deleted]

        Z Offline
        Z Offline
        Zac Howland
        wrote on last edited by
        #3

        If you are the one throwing it, and you are using Microsoft's compiler, you can use the __FILE__ and __LINE__ directives as a part of your exception message.

        class custom_exception : public exception
        {
        public:
        	custom_exception(const string& file, const string& line, const string& msg)
        	{
        		_Msg = file;
        		_Msg += ":";
        		_Msg += line;
        		_Msg += "::";
        		_Msg += msg;
        	}
        
        	string getMessage() const
        	{
        		return _Msg;
        	}
        private:
        	string _Msg;
        };
        
        void MyFunction() throw(...)
        {
        	// something went wrong, need to throw
        	throw custom_exception(__FILE__, __LINE__, "Something went wrong here!");
        }
        

        If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week Zac

        1 Reply Last reply
        0
        • K KKumarTG

          [Message Deleted]

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

          KKumarTG wrote:

          [Message Deleted]

          Message Deletion is sin here!

          "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

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

          1 Reply Last reply
          0
          • K KKumarTG

            [Message Deleted]

            H Offline
            H Offline
            Hamid Taebi
            wrote on last edited by
            #5

            Wheres your question?

            _**


            **_

            WhiteSky


            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