--- nfo/perl/libs/Tangram/Storage.pm 2002/12/19 16:37:54 1.7 +++ nfo/perl/libs/Tangram/Storage.pm 2003/04/23 23:40:58 1.8 @@ -705,6 +705,7 @@ my $row = _fetch_object_state($self, $id, $class); my $obj = $self->read_object($id, $class->{name}, $row); + return undef unless defined $row; # ??? $self->{-residue} = \@row; @@ -722,6 +723,7 @@ my $class = $self->{schema}->classdef( $self->{id2class}{ int(substr($id, -$self->{cid_size})) } ); my $row = _fetch_object_state($self, $id, $class); + return undef unless defined $row; _row_to_object($self, $obj, $id, $class->{name}, $row); return $obj; @@ -793,6 +795,10 @@ $sth->execute($self->{export_id}->($id)); my $state = [ $sth->fetchrow_array() ]; + unless (@$state) { + return undef unless $sth->err; + croak "error during load of object id=$id: $sth->err"; + } $sth->finish(); return $state;