> From: Robert Hicks [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 14, 2007 01:16 PM

> So I should still "or die..." even if I set ShowErrorStatement? I ask, 
> because if true, then I would like to let the author of the paper I am 
> reading know to make corrections if needed.

To oversimplify somewhat:

* PrintError prints an error message whenever there is an error.

* RaiseError does the same as PrintError and also dies.

* ShowErrorStatement shows the SQL statement associated with an error if either 
PrintError or RaiseError is true but does nothing otherwise.

ShowErrorStatement only sets the level of verbosity of the messages shown by 
PrintError and RaiseError, it does not specify whether the message is shown in 
the first place or whether the error causes the program to die.  So no, 
ShowErrorStatement has nothing to do with whether or not you sprinkle your code 
with "or die" statements.

RaiseError is the one that dies on error.  If it is set then you do *not* need 
to explicitly "or die". If it is not set, and you do not use "or die" your 
program will keep running even after it encounters errors.

Styles vary, my personal preference is to set RaiseError to true in the connect 
statement and omit "or die" in the rest of the code.

--
Jeff




Reply via email to