Style question: returning error values from functions
Richard Gaskin
ambassador at fourthworld.com
Sun Jul 13 01:17:00 EDT 2003
Monte Goulding wrote:
>> I readily use throw in scripts for my own use. I also have used it in
>> a library I will make generally available, and I'm thinking of changing
>> the scripts so that they do not throw. Are people comfortable with
>> throw?
>
> Yes, I was just about to suggest it to Richard. I think this is an under
> used language feature. Unfortunalty Scott designed the engine throws to
> require considerable parsing of the error variable to determine the problem
> so you need to handle the possibility of an engine throw. One advatage of
> throws is that they continue through the heirarchy until they are handled. I
> also find that scripts that use try/catch control structures are far clearer
> to read.
Throw wins.
Good discussion. Thanks.
--
Richard Gaskin
Fourth World Media Corporation
Developer of WebMerge 2.2: Publish any database on any site
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
Tel: 323-225-3717 AIM: FourthWorldInc
More information about the metacard
mailing list