exit( ); Error descriptions in VC++ 7!
-
Hi! Don't even know how to put this! So just try to guess what I mean! :laugh: In VC++ you can include this line
exit(100);
etc. And force the program to exit to OS with VC++ reporting, in the EXIT window:programm....exited with code (100)
or something like that. My question is this: Is there a way to tell VC++ to report 100 as saywrong argument for myFuntion(int);
instead of just reporting error number? I only want to know how to make VC report the error with description not the program itself (ie. via a dialog window). -------------------------------------------------------- DEBUGING IS A BITCH :smiley whith brains blown out: -------------------------------------------------------- -
Hi! Don't even know how to put this! So just try to guess what I mean! :laugh: In VC++ you can include this line
exit(100);
etc. And force the program to exit to OS with VC++ reporting, in the EXIT window:programm....exited with code (100)
or something like that. My question is this: Is there a way to tell VC++ to report 100 as saywrong argument for myFuntion(int);
instead of just reporting error number? I only want to know how to make VC report the error with description not the program itself (ie. via a dialog window). -------------------------------------------------------- DEBUGING IS A BITCH :smiley whith brains blown out: --------------------------------------------------------CreepingFeature wrote: Is there a way to tell VC++ to report 100 as say wrong argument for myFuntion(int); instead of just reporting error number No, not a far as I know of. These so called return code is some sort of the lowest common demnominator of error reporting. They are designed to work on every OS. All you know is that '0' means 'No Error'. Other codes have to be documented (on Unix, man pages do this, but windows is deficient in this way, too) to be used in eg. batch scripts.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation." -- Caius Petronius, Roman Consul, 66 A.D.