Thanks, Tim.  I totally agree.  At least now there is an expected behavior,
PrintError and RaiseError if both are turned on, shouldn't be any confusion.
The reflected change in the docs is also very clear.

Ilya Sterin

-----Original Message-----
From: Tim Bunce [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 7:59 PM
To: Neil Lunn
Cc: 'Tim Bunce'; Sterin, Ilya; [EMAIL PROTECTED]
Subject: Re: executing atomic transactions in DBI


On Thu, May 10, 2001 at 09:54:30AM +1000, Neil Lunn wrote:
> >
> > but now I've changed it to say:
> >
> > : If you turn C<RaiseError> on then you'd normally turn
> > C<PrintError> off.
>
> I like that, it's an important statement to make.
>
> > : If C<PrintError> is also on, then the C<PrintError> is done
> > first (naturally).
> >
> > In other words, I've removed the trying-to-be-too-clever logic.
> > If you ask for both PrintError and RaiseError then that's
> > what you get.
>
> As long and the words 'warn' and 'die' are listed in the documentation I
> agree that this should be very clear.
> Umm. Does that just mean in the docs or :
>
> -            if (!raise_error || (diehook && SvOK(diehook)))
> +            if (!raise_error)

The internal code is now just:

        if (DBIc_has(imp_xxh, DBIcf_PrintError))
            warn("%s", SvPV(msg,lna));
        if (DBIc_has(imp_xxh, DBIcf_RaiseError))
            croak("%s", SvPV(msg,lna));

Tim.

Reply via email to