Using Visual C6.
What I would like to do is build a general purpose Exception handling class.
What I need to do is this, on ANY error within a TRY block I want the catch statement to take the windows error number and pass it to the class as a pointer so I can retrieve the windows error number and the error description along with some other useful information and be able to save it to the users hard drive. What I’m not sure about is how to go about catching the number, do I use GetLastError or GetErrorInfo or what?
I don’t know about you but I got tired of users telling me that they had gotten an error and when you ask them what the error said, their reply is “ oh I forgot to write it down” or when asked what they were doing “I don’t remember exactly what I was doing when it happened”. So I created a function in Visual Basic that I could pass the windows error number, the block of code that was running at the time of the error and approximately where in the block (about every tenth line or so) the program caused the error. This along with some information about the users machine I write to a text file on the users machine, this way I can have them email me the file.