throw vs the result

Dar Scott dsc at swcp.com
Sat Apr 30 23:01:12 EDT 2005


On Apr 30, 2005, at 3:22 PM, Dar Scott wrote:
> I was wondering what people prefer as far as "fatal" errors in 
> executing a custom command, such as in a library.
>
> Should that be in a non-empty value returned by result()?
> Or should that cause some error message to the thrown?
> Or does it depend on the error?

OK, well, what about a library that exports lots of functions, such as 
a math library?  Functions don't have a separate result for an error.

Should the error be a special value in the result and propagated 
through?
Or should an error function tell whether there was an error since the 
last call to error function?
Or should an error be thrown?

Dar

-- 
**********************************************
     DSC (Dar Scott Consulting & Dar's Lab)
     http://www.swcp.com/dsc/
     A Sponsor of RevCon West
**********************************************



More information about the use-livecode mailing list