Need an example of how to use "try" and "catch"
    Bernard Devlin 
    bdrunrev at gmail.com
       
    Thu Mar 22 17:37:57 EDT 2012
    
    
  
I have been using the try/catch idiom for years.  I like the structure
it gives my code - visually it makes it very clear where I am
expecting problematic sections to be.  I rarely use 'finally'.
However the problem has always been with interpreting the error codes
that arise.  For years I got round that by incorporating Mark
Schonewille's errorLib in my stacks.
Like you, I find that sqlYoga really needs try/catch.  I did see
somewhere else that Trevor recommended having some specific error
handler implemented, but for me just wrapping the calls that go to the
database in try/catch solves the problem.
Bernard
On Thu, Mar 22, 2012 at 8:25 PM, Bob Sneidar <bobs at twft.com> wrote:
> No advantage per se, but I use sqlYoga and the only way to determine what went wrong is in a try catch statement as the libSQLYoga stack is locked.
>
> Bob
    
    
More information about the use-livecode
mailing list