|
-
Jan 17th, 2008, 04:21 AM
#1
Thread Starter
PowerPoster
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|