--- trunk/lib/WebPAC/Search/Estraier.pm 2005/11/22 08:37:40 86 +++ trunk/lib/WebPAC/Search/Estraier.pm 2005/11/22 08:37:45 87 @@ -115,10 +115,10 @@ my $log = $self->_get_logger; - $log->logconfess('need db in object') unless ($self->{'db'}); - $log->logconfess('need attr') unless ($args->{'attr'}); + $self->confess('need db in object') unless ($self->{'db'}); + $self->confess('need attr') unless ($args->{'attr'}); - $log->logconfess("need attr as array not " . ref($args->{'attr'}) ) unless (ref($args->{'attr'}) eq 'ARRAY'); + $self->confess("need attr as array not " . ref($args->{'attr'}) ) unless (ref($args->{'attr'}) eq 'ARRAY'); my $q = $args->{'query'}; @@ -163,7 +163,7 @@ $log->debug("results " . Dumper( \@results )); - $log->logconfess("expected to return array") unless (wantarray); + $self->confess("expected to return array") unless (wantarray); return @results; } @@ -179,10 +179,11 @@ sub confess { my $self = shift; if (my $log = $self->{'log'}) { - if ($log->can('confess')) { - $log->confess(@_); + if ($log->can('logconfess')) { + $log->logconfess(@_); } elsif ($log->can('fatal')) { $log->fatal(@_); + die @_; } elsif ($log->can('error')) { $log->error(@_); } else {