Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: On using RaiseError

by Masem (Monsignor)
on Jan 26, 2002 at 17:53 UTC ( #141783=note: print w/replies, xml ) Need Help??

in reply to On using RaiseError
in thread DBI conditional insert (and things of those nature)

To the experienced user, RaiseError is a good thing, and as you say, it does force you to wrap things into eval loops to handle errors. However, newer programmers may forget to wrap the DBI calls in evals, or will write several lines of DBI code that don't fail to work, and then be completely confused when something small changes and their program dies, and they'll be wondering what went wrong. I'd rather see people not used to DBI or perl in general use the "or die" approach, such that they understand that every "prepare" and "execute" statment in DBI should be checked for errors. Once they've understood that, then moving them on to RaiseError and eval's are a good thing. But again, IMO as well.

Dr. Michael K. Neylon - || "You've left the lens cap of your mind on again, Pinky" - The Brain
"I can see my house from here!"
It's not what you know, but knowing how to find it if you don't know that's important

Replies are listed 'Best First'.
Re: Re: On using RaiseError
by little (Curate) on Jan 26, 2002 at 18:52 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://141783]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (11)
As of 2018-06-22 12:03 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.