> On Jun 24, 2016, at 11:08 AM, Mark Waddingham <m...@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.)


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to