Go Card Error Handling

Dar Scott dsc at swcp.com
Fri Jun 24 13:46:27 EDT 2016


> On Jun 24, 2016, at 11:08 AM, Mark Waddingham <mark at livecode.com> wrote:
> 
> From an error handling point of view, these present two entirely different cases.
> 
> For operations which you should always expect to succeed *or* can guarantee will succeed by a preceding check in code, the correct error approach is to throw.
> 
> For operations which could fail and you cannot 'precheck' for failure, the correct error approach is to set the result.

I would be pleased to adapt to whatever changes a documented simplifying philosophy of errors brings about, both in my use of LiveCode and (if accepted by others) in how my libraries present errors.  

(Internal to my libraries, I take the style that is cleanest and simplest for my thinking.  At the interface, between throw and set-the-result, I'm currently driven by what the customer is familiar with, and I sometimes supply both.  I also very often use tenacious errorless machinery that simply has a state of stalled progress.  And I use a couple other styles.)





More information about the use-livecode mailing list