Click here to Skip to main content
15,922,630 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralError handling - a best way Pin
CodingLover16-Jan-08 22:23
CodingLover16-Jan-08 22:23 
GeneralRe: Error handling - a best way Pin
CPallini16-Jan-08 23:21
mveCPallini16-Jan-08 23:21 
GeneralRe: Error handling - a best way Pin
CodingLover16-Jan-08 23:38
CodingLover16-Jan-08 23:38 
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 
Eranga Thennakoon wrote:
Displaying error codes is not prefer for users.


According to me users are most probably not bothered about exact the reason behind the error. So what I used to do was telling the user about failure happened in simple sentence and add some message that is helpful for the developer.

For example, see this error message.

Fatal Error<br />
Error: Could not load the image file.<br />
Failed to load the image in CMainWindow::InitInstance.


What I noted that, user who is getting the error will inform the developer (ofcourse not directly) that the program ceased to work and shows a message as ...

So the developer got a chance to identify the problem while sitting in his seat.

PS: This may not be feasible for large scale productions. But for small scale of productions I have found it is useful.

- NS -
[ODBaseBtn]

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 
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 

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.