Results 1 to 3 of 3

Thread: Error handling - a best way

Threaded View

  1. #1

    Thread Starter
    PowerPoster eranga262154's Avatar
    Join Date
    Jun 2006
    Posts
    2,201

    Wink Error handling - a best way

    Hi all,

    Still I'm learning C++ and I'll try my best used most better ways in my works.

    When I'm coding, I mean use of try, catch or if, else etc..., always used a single line of code. Here it is...

    Code:
    cout << "Error. GetLastError reports " << GetLastError() << endl;
    In simple word find the error code and correct way. If I'm working on MFC, cout replaced by a message box.

    My question is what is the best way to display errors for users. Displaying error codes is not prefer for users. Is that a separate section in C++, handling errors/exceptions.
    Last edited by eranga262154; Jan 17th, 2008 at 04:24 AM.
    “victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width