Handling error in production code

24 Jan
2003
24 Jan
'03
9:54 a.m.
What is the best way to handle error in production code? I have successfully built a COM object (many thanks Sigbjorn!!!), which works fine. The only hassle is that an error being thrown causes the program using the COM object to hard terminate. This is clearly not desirable, especially since parse errors can cause this. What I'd *ideally* like would be for a call to return an error code as an HRESULT, but leave the internal state of the object unchanged. Is this feasible? Do I need to think carefully about using something other than 'error'? If so, how do I handle library code's use of error here and there? TIA, Sarah
8152
Age (days ago)
8152
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sarah Thompson