X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1d540b8d67d025876165c06509e6c3c6c7d0564e..6bdcd83826c0cf1d86450bc205c00864d8a0c403:/SL/DB/Helper/ActsAsList.pm 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;