Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Error handling - a best way Pin
CPallini17-Jan-08 0:22
mveCPallini17-Jan-08 0:22 
GeneralRe: Error handling - a best way Pin
CodingLover17-Jan-08 0:42
CodingLover17-Jan-08 0:42 
QuestionRe: Error handling - a best way Pin
David Crow17-Jan-08 2:31
David Crow17-Jan-08 2:31 
GeneralRe: Error handling - a best way Pin
CPallini17-Jan-08 3:32
mveCPallini17-Jan-08 3:32 
GeneralRe: Error handling - a best way Pin
Nishad S16-Jan-08 23:56
Nishad S16-Jan-08 23:56 
GeneralRe: Error handling - a best way Pin
CodingLover17-Jan-08 0:33
CodingLover17-Jan-08 0:33 
GeneralRe: Error handling - a best way Pin
Nishad S17-Jan-08 0:53
Nishad S17-Jan-08 0:53 
GeneralRe: Error handling - a best way Pin
James R. Twine17-Jan-08 4:11
James R. Twine17-Jan-08 4:11 
   I would suggest displaying both the error code and the error description for a couple of reasons.  First, IME, numeric error codes are likely to be read back to a support person correctly as opposed to a possibly long error message text.  Some users find it insulting when you have to keep asking them to "read back the error message exactly as shown," and even then may skip a word or paraphrase.

   Second, if being used on a non-English version of Windows, the error message text may be unfamiliar to your support staff, but the error code will remain the same.

   I tend to format errors as follows: [ActionAndOrContext]:[ErrorCode]-[ErrorMessage].  Examples:
     Unable to open the data file: 5-Access is denied.
     Unable to process the data file: 8-Not enough storage is available to process this command.
   If you are writing a Windows GUI application (using MFC or not), I would suggest using Message Boxes.

   Lastly - do not forget (Correct) logging.  Having an accurate log of what took place before an error is invaluable.

   Peace!

-=- James
Please rate this message - let me know if I helped or not!<hr></hr>If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
See DeleteFXPFiles



GeneralRe: Error handling - a best way Pin
CodingLover17-Jan-08 15:09
CodingLover17-Jan-08 15:09 
Generalcompile error about void* Pin
George_George16-Jan-08 21:10
George_George16-Jan-08 21:10 
GeneralRe: compile error about void* Pin
Cedric Moonen16-Jan-08 21:20
Cedric Moonen16-Jan-08 21:20 
GeneralRe: compile error about void* Pin
George_George16-Jan-08 21:58
George_George16-Jan-08 21:58 
QuestionRe: compile error about void* Pin
David Crow17-Jan-08 2:34
David Crow17-Jan-08 2:34 
GeneralRe: compile error about void* Pin
George_George17-Jan-08 2:48
George_George17-Jan-08 2:48 
GeneralRe: compile error about void* Pin
David Crow17-Jan-08 3:13
David Crow17-Jan-08 3:13 
GeneralRe: compile error about void* Pin
George_George17-Jan-08 3:29
George_George17-Jan-08 3:29 
QuestionRe: compile error about void* Pin
David Crow17-Jan-08 3:40
David Crow17-Jan-08 3:40 
GeneralRe: compile error about void* Pin
George_George17-Jan-08 3:30
George_George17-Jan-08 3:30 
GeneralRe: compile error about void* Pin
David Crow17-Jan-08 3:35
David Crow17-Jan-08 3:35 
GeneralRe: compile error about void* Pin
George_George17-Jan-08 3:39
George_George17-Jan-08 3:39 
GeneralRe: compile error about void* Pin
David Crow17-Jan-08 3:45
David Crow17-Jan-08 3:45 
GeneralRe: compile error about void* Pin
George_George17-Jan-08 3:55
George_George17-Jan-08 3:55 
GeneralRe: compile error about void* Pin
James R. Twine17-Jan-08 3:59
James R. Twine17-Jan-08 3:59 
GeneralRe: compile error about void* Pin
George_George17-Jan-08 4:10
George_George17-Jan-08 4:10 
GeneralRe: compile error about void* Pin
Hamid_RT17-Jan-08 18:14
Hamid_RT17-Jan-08 18:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.