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 | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/c-prog/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
