Re: Exceptions vs. pointers to error objects

2008-10-28 Thread Ken Ferry
> Perhaps there is already a policy on when each is to be used. If so, please > enlighten me. :) There is a policy in Cocoa. I'm pretty sure it's documented, but I didn't find it laid out just now.. Exceptions are for things that just shouldn't happen, or that are essentially unrecoverable. Thr

Re: Exceptions vs. pointers to error objects

2008-10-28 Thread Stephen J. Butler
On Tue, Oct 28, 2008 at 2:58 AM, Colin Cornaby <[EMAIL PROTECTED]> wrote: > I'm writing an API to communicate with a web service, and I was just > wondering what the thinking is on exceptions vs. functions returning an > NSError in some way. Basically I'm wondering what people's opinions are on a >

Re: Exceptions vs. pointers to error objects

2008-10-28 Thread Charles Steinman
--- On Tue, 10/28/08, Colin Cornaby <[EMAIL PROTECTED]> wrote: > I'm writing an API to communicate with a web service, > and I was just > wondering what the thinking is on exceptions vs. functions > returning > an NSError in some way. Basically I'm wondering what > people's opinions > are on

Exceptions vs. pointers to error objects

2008-10-28 Thread Colin Cornaby
I'm writing an API to communicate with a web service, and I was just wondering what the thinking is on exceptions vs. functions returning an NSError in some way. Basically I'm wondering what people's opinions are on a function throwing an exception on failure, vs returning an NSError object