diff --git a/lib/NGCP/Cleanup.pm b/lib/NGCP/Cleanup.pm index 67ec5d9..ce04306 100644 --- a/lib/NGCP/Cleanup.pm +++ b/lib/NGCP/Cleanup.pm @@ -655,6 +655,8 @@ SQL DELETE FROM $table WHERE $col < unix_timestamp(date(date_sub(now(), interval ? day))) $limit SQL } + $self->error("Cannot delete: $DBI:errstr") if $DBI::err; + $aff //= 0; $deleted_rows += $aff; last unless $aff > 0; }