CTR: Wirklich mit "die", die Fehler werfen. Einrückung
authorJan Büren <jan@kivitendo.de>
Fri, 1 Jan 2021 17:14:19 +0000 (18:14 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 5 May 2021 15:25:03 +0000 (17:25 +0200)
SL/BackgroundJob/ConvertTimeRecordings.pm

index 438efbb..8f6a329 100644 (file)
@@ -77,7 +77,7 @@ sub run {
       })) {
         $::lxdebug->message(LXDebug->WARN(),
                             "ConvertTimeRecordings: saving delivery order failed for time recording ids " . join ', ', map { $_->id } @{$time_recordings_by_customer_id{$customer_id}});
-      push @{ $self->{job_errors} }, "ConvertTimeRecordings: saving delivery order failed for time recording ids " . join ', ', map { $_->id } @{$time_recordings_by_customer_id{$customer_id}};
+        push @{ $self->{job_errors} }, "ConvertTimeRecordings: saving delivery order failed for time recording ids " . join ', ', map { $_->id } @{$time_recordings_by_customer_id{$customer_id}};
       } else {
         push @donumbers, $do->donumber;
       }
@@ -94,7 +94,7 @@ sub run {
   if (@{ $self->{job_errors} }) {
     $msg  .= ' ' . t8('The following errors occurred:');
     $msg  .= join "\n", @{ $self->{job_errors} };
-    return $msg;
+    die $msg;
   }
   return $msg;
 }