- die "no id or dbfile" unless $params{id} || $params{dbfile};
- my $rc = SL::DB->client->with_transaction(\&_delete, $self, %params);
- if (!$rc) {
- my $err = SL::DB->client->error;
- die (ref $err?$$err:$err);
- }
+ die "no id or dbfile in delete" unless $params{id} || $params{dbfile};
+ my $rc = 0;
+ eval {
+ $rc = SL::DB->client->with_transaction(\&_delete, $self, %params);
+ 1;
+ } or do { die $@ };