Error handling (was Re: "nan" v. try-catch for arithmetic)
pete at lcsql.com
Thu Jun 26 18:23:17 CEST 2014
On Thu, Jun 26, 2014 at 8:22 AM, Richard Gaskin <ambassador at fourthworld.com>
> Is there a simple rule that would allow scripters to understand when
> try-catch is necessary and when the result should be checked instead?
> If not, should there be?
> Or perhaps better yet, could error handling be made uniform, maybe as part
> of the Open Language initiative? If so, what would it look like?
Personally, I think error handling should be made uniform. As you say,
sometimes try/catch is required, other times the result must be checked and
sometimes "it" must be checked. Then there's the different ways errors are
reported by the database library commands.
Maybe there should a new variable - the error for example - which can be
used to report all error conditions. Another approach might be the ability
to specify a error callback handler similar to the libURL commands.
lcSQL Software <http://www.lcsql.com>
Home of lcStackBrowser <http://www.lcsql.com/lcstackbrowser.html> and
More information about the use-livecode