Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!nuchat!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.lang.c Subject: Re: Error Handling Keywords: Errors Message-ID: Date: 29 Sep 90 18:23:14 GMT References: <837@babcock.cerc.wvu.wvnet.edu> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 19 "Do you want to try door #1, door #2, or door #3?" "Yes." Door #1 (if(error) {cleanup; return;}) If cleanup is relatively small. Door #2 (if(!error) {next_step;}) If there are relatively few cases, or you have religious reasons not to use #3 (i.e., it's on an exam) Door #3 (if(error) goto cleanup;) If there are lots of cases and cleanup is nasty. I've used all three. -- Peter da Silva. `-_-' +1 713 274 5180. 'U` peter@ferranti.com