Bug 37552: (24.05.x) Wrap auto renewal attempt in eval to ensure script does not die
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e6b23deb4c
commit
13c6a4a1bb
|
|
@ -170,7 +170,13 @@ while ( my $auto_renew = $auto_renews->next ) {
|
|||
$wants_digest = 0;
|
||||
}
|
||||
|
||||
my ( $success, $error, $updated ) = $auto_renew->attempt_auto_renew( { confirm => $confirm } );
|
||||
my ( $success, $error, $updated );
|
||||
eval { ( $success, $error, $updated ) = $auto_renew->attempt_auto_renew( { confirm => $confirm } ); };
|
||||
if ($@) {
|
||||
print "An error was encountered in processing auto renewal for issue id: " . $auto_renew->issue_id . "\n";
|
||||
print "$@ \n";
|
||||
next;
|
||||
}
|
||||
if ($success) {
|
||||
if ($verbose) {
|
||||
say sprintf "Issue id: %s for borrower: %s and item: %s %s be renewed.",
|
||||
|
|
|
|||
Loading…
Reference in New Issue