Your code taught me much, Heimer. Is that a common way to handle
errors in C? I'm lacking of experience, every time I have to handler
errors, I got bored by many many if-else... And sometimes I cannot find
a neat way to handle them. I want to learn, how to handle errors in C,
in a professional way?

You know, it's very annoying that, when you have a good idea and begin
to write it down fluently like writting a nice song, a devil jumps out
shouting "hey, boy, haven't you read manauls of functions you called?
there are hundreds sorts of errors they may return, catch them, or
you'll be caught" Then I have to stop and add many many if-else to check
those return code, and more if-else to handle error codes in
error-handlers themself. Sometimes I have to change the whole structure
into an ugly one. and worse, sometimes I couldn't find a good way to
handle.


On Sat, 23 Oct 2004 22:00:28 -0700
Josh Helmer <[EMAIL PROTECTED]> wrote:

> I would stress that this really should only be used in special circumstances
> not as a general idiom for error handling, but on occasion it is useful. 
> Another note: NEVER do this in C++.  Correctly using the RAII idiom should
> completely eliminate the need for code like this with the added bonus of
> making your code exception safe.




To unsubscribe, send a blank message to <mailto:[EMAIL PROTECTED]>.


Yahoo! Groups Sponsor
ADVERTISEMENT
click here
Web Bug from http://us.adserver.yahoo.com/l?M=298184.5285298.6392945.3001176/D=groups/S=:HM/A=2319498/rand=663564770


Yahoo! Groups Links

Reply via email to