throw vs the result

Dar Scott dsc at
Sat Apr 30 22:01:12 CDT 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 
Or should an error function tell whether there was an error since the 
last call to error function?
Or should an error be thrown?


     DSC (Dar Scott Consulting & Dar's Lab)
     A Sponsor of RevCon West

More information about the use-livecode mailing list