in reply to Having problem with handling DBI error in object

Just read $obj->{ERROR_STR} before doing stuff that might change it, just like you do with $DBI::errstr. Alternatively, throw it as an exception.

Replies are listed 'Best First'.
Re^2: Having problem with handling DBI error in object
by perlCrazy (Monk) on Jul 19, 2007 at 21:35 UTC
    u mean like this :
    $obj->getDDL(); if (!$obj->{ERROR_STR} { ##call other method }
      if (!$obj->getDDL()) { ##use $obj->{ERROR_STR} } ##call other method