Meaningful and verbose error messages in LiveCode

Bob Sneidar bobsneidar at iotecdigital.com
Thu Nov 20 10:52:31 EST 2014


In FoxPro you could simply create a handler which got triggered by errors then check an internal code for what the most recent error was, then make a switch statement to handle all the pertinent errors for your project. The normal error message display was suppressed so that the developer could present a message of his own and then act accordingly. For example, database connection errors could drop into a repeat loop asking the user to try again or quit. I think this would be a preferable method to try/catch because all your error code could be consolidated into one place. 

I suppose you could still do this by wrapping all your code in a try catch construct, then calling your error function, but then the debugger would not stop at the line producing the error, making you have to do a little detective work to find which line caused the fartup. 

Bob S


> On Nov 19, 2014, at 12:47 , Alejandro Tejada <capellan2000 at gmail.com> wrote:
> 
> J. Landman Gay wrote
>> The error descriptions are stored in the cErrorsList of the first card 
>> of stack "revErrorDisplay". You could edit those, but you'd need to do 
>> it again for each new LiveCode version.
> 
> Many Thanks, Jacque!
> 
> I wrote in the message box:
> put the cErrorsList of card 1 of stack "revErrorDisplay"
> and there it is. A complete list of error messages. :D
> 
> After my current headache dissapears, I will study
> how these error messages could trigger another
> stack with Custom notes and warnings.
> 
> Thanks a lot again, Jacque.
> 
> Al
> 
> 
> 
> 
> 
> 
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Meaningful-and-verbose-error-messages-in-LiveCode-tp4686019p4686049.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list