Re: [Tutor] Exceptions vs. Status Codes

2005-12-07 Thread Kent Johnson
[EMAIL PROTECTED] wrote: > Hi, > > I have a general question regarding programming style which may or may > not have an answer. Is it a better practice to have a function raise > an exception on error, so that the error can be caught; or return a > status code indicating that the function was uns

Re: [Tutor] Exceptions vs. Status Codes

2005-12-07 Thread Alan Gauld
> not have an answer. Is it a better practice to have a function raise > an exception on error, so that the error can be caught; or return a > status code indicating that the function was unsuccessful? Exceptions are nearly always better. For some of the reasons why, see my tutorial topic on Erro

[Tutor] Exceptions vs. Status Codes

2005-12-06 Thread wkranec
Hi, I have a general question regarding programming style which may or may not have an answer. Is it a better practice to have a function raise an exception on error, so that the error can be caught; or return a status code indicating that the function was unsuccessful? Like I said, I don't expe