Re: printing error messages
- From: Richard<rgrdev@xxxxxxxxx>
- Date: Sat, 31 May 2008 20:16:21 +0200
santosh <santosh.k83@xxxxxxxxx> writes:
Bill Cunningham wrote:
news:dd7b86c4-554d-439d-ac90-a522770ce6ce@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
"gsa" <hsggwk@xxxxxxxxx> wrote in message
I just stuck the error function call in the if block and it worked.
if((fp = fopen(stretchesFile, "w")) == NULL) {
error(1, errno, "could not open file %s", stretchesFile);
exit(1);
}
Thanks again for your help!!
For my 2 cents worth exit(1) isn't portable. Try
exit(EXIT_FAILURE) from
stdlib.h. For me it has made the difference between a working and non
working program.
exit(1) didn't work? What's your system and what exactly happened, i.e.,
what was the behaviour that made you conclude that exit(1) failed.
He is trolling. I replied before realising who it was.
.
- References:
- printing error messages
- From: gsa
- Re: printing error messages
- From: Walter Roberson
- Re: printing error messages
- From: gsa
- Re: printing error messages
- From: gsa
- Re: printing error messages
- From: Bill Cunningham
- Re: printing error messages
- From: santosh
- printing error messages
- Prev by Date: Re: printing error messages
- Next by Date: Re: private functions
- Previous by thread: Re: printing error messages
- Next by thread: Re: printing error messages
- Index(es):
Relevant Pages
|