Randal, we'll discuss off list since I totally agree that this (rumor??) can
get out of hand.  The script provided is supposed to fail when the query
does not execute due to mispelled table name, but it rather prints the error
message (as it suppost to) but then proceeds to print the rest of the form.
The problem might also be in my script, server configuration, etc..., so
before this gets out of hand, I'd rather this be investigated.

Ilya Sterin

-----Original Message-----
From: [EMAIL PROTECTED]
To: Sterin, Ilya
Cc: 'Stephen Clouse '; '[EMAIL PROTECTED] '; '[EMAIL PROTECTED] '
Sent: 05/07/2001 8:05 AM
Subject: Re: executing atomic transactions in DBI

>>>>> "Ilya" == Sterin, Ilya <[EMAIL PROTECTED]> writes:

Ilya> Not sure what you consider a rumor, I just simply stated having
Ilya> a problem with it before and that in my experience I always
Ilya> check for return value, due to either the query failing and/or
Ilya> executing without failing, but still producing an unexpected
Ilya> result.  By implying that the trasaction does not fail without
Ilya> checking for return, does not necessarily mean that there was an
Ilya> SQL error, but rather the query produced an unexpected result.

I think perhaps the problem was sloppy terminology.  A RaiseError=1
block should prevent you from ever needing "|| die" after each call.
Let's call that a "DBI error".

You seem to also be including the problem of a "domain error" where
something doesn't make sense, even though DBI has performed perfectly
in getting the query to and from the database.  No amount of "|| die"
will detect that, and therefore RaiseError=1 will be ineffective.

So I think I was claiming that you were spreading FUD for claiming
that RaiseError=1 still needs "|| die" to trigger DBI errors.  I'm
still waiting for a sample of that.  The code you just posted does not
have an eval {} block, so I doubt that you sent code that actually
shows the problem.

But it appears that you also want a way of detecting domain errors
without having to check the length of the results.  That's your code,
your responsibility.

Ilya> Sorry if I offended you in any way, since you decided to flame
Ilya> me, without reading the whole thread.

You're not offending me, and I'm not flaming you.  I'm just in rumor
control mode, since something like this can get out of hand.

Please post some code that uses RaiseError=1, no "|| die" and an eval
block, and yet still doesn't detect a DBI error, and that we can
verify.  I'll bet this month's rent that either you can't, or that
we've found a bug in DBI that must be corrected.

In any case, I'll stand by my claim that as I understand it, it's
intended and implemented that RaiseError=1 completely replaces the
need for adding "|| die" to detect DBI errors.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777
0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl
training!

Reply via email to