X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FHelper%2FActsAsList.pm;h=7ca63a353fde47542a4a3740076a770fa488190a;hb=f5e39f21bd5f9c5dd9a8bbbdfa34d0c17a2fc44d;hp=abe11c06338ccf15c8f989b1e8832dc0c97c7115;hpb=e2332bfd203a5d9925034dfdd90a15b3c9c66044;p=kivitendo-erp.git diff --git a/SL/DB/Helper/ActsAsList.pm b/SL/DB/Helper/ActsAsList.pm index abe11c063..7ca63a353 100644 --- a/SL/DB/Helper/ActsAsList.pm +++ b/SL/DB/Helper/ActsAsList.pm @@ -143,10 +143,10 @@ sub reorder_list { my $column = column_name($self); my $result = $self->db->with_transaction(sub { my $query = qq|UPDATE | . $self->meta->table . qq| SET ${column} = ? WHERE id = ?|; - my $sth = $self->db->dbh->prepare($query) || die $self->db->dbh->errstr; + my $sth = $self->db->dbh->prepare($query) || SL::X::DBUtilsError->throw(msg => 'reorder_list error', db_error => $self->db->dbh->errstr); foreach my $new_position (1 .. scalar(@ids)) { - $sth->execute($new_position, $ids[$new_position - 1]) || die SL::X::DBUtilsError->new(error => $sth->errstr); + $sth->execute($new_position, $ids[$new_position - 1]) || SL::X::DBUtilsError->throw(msg => 'reorder_list error', db_error => $sth->errstr); } $sth->finish;