[prog] C programming - capturing information sent to stdout

Sue Stones suzo at spin.net.au
Thu Jul 14 11:11:56 EST 2005


Mary wrote:

> 
>Note that assert, because it makes your program crash, is not designed
>to handle *expected* error (error that you anticipate happening in the
>normal course of your programming running) like badly formed input from
>users (imagine if Firefox crashed every time you put in a URL that
>didn't work!) or the network going down, or the database returning no
>results.
>  
>
Thanks for your explanation Mary, that was great.  I was wondering about 
things like replacing all the error checking around things like opening 
a file ... (open file, check if its open, in not print an error message, 
and then exit(1) ).
It would certainly make that code more readable. 

sue




More information about the Programming mailing list