On Mon, Feb 1, 2010 at 1:40 PM, Tony Esposito wrote:

Is this the idea? I do not ever want to catch the error from the prepare
statement itsel
I thought you said the program fails if you don't catch the error? If so,
and you want your program to continue executing, then you have to catch the
error the exact moment it happens.

-- I want my code to catch and throw the error.
I'm not sure what you are referring to, so here is some information and
hopefully you will be able to sort out your problem. You catch errors using
the terribly misnamed 'eval' block. Any error inside the eval block is
caught by $@. To throw errors, you can use die(). The die() in my example
was used to mimic prepare() throwing an error.

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 5 of 12 | next ›
Discussion Overview
groupbeginners @
postedFeb 1, '10 at 7:11p
activeFeb 11, '10 at 1:21a



site design / logo © 2022 Grokbase