On Tue, Jun 27, 2006 at 04:37:24PM +0100, Martin J. Evans wrote:
> Hi,
> 
> I am trying to locate the parameter values passed to a do method call in an
> error handler called when the do method fails.

> The error handler is called with a db handle and what follows is all I can
> currently find out:
> 
> msg passed to error handler indicates error on insert3
> handle passed to error handler has:
>   value of DBIx::Log4perl::db=HASH(0x9b22398)
>   Type => db
>   Kids => 1
>   ActiveKids => 0
>   Statement => insert3 SQL
>   ChildHandles => 64 handles, 1 of which is non-null
>   Active => 1
> DBI::lasth is DBIx::Log4perl::db=HASH(0x9b229f8)
>   ! $DBI::lasth->{Statement} is select1 and not insert3
> DBI::lasth->{Type} = db
> The one sth in db's ChildHandles which is not null has:
>   Statement => select1
>   ParamValues => :p1 => '1' (which is correct for select1)
>   Active => undef
>   Executed => 1
> 
> So where are the ParamValues for insert3 - the actual "do" which failed?

The statement handle has been destroyed by then.

The subclass probably needs to use the HandleSetErr attribute to
capture the error as it's being recorded by the driver.

Tim.

Reply via email to