Browse Source

Bug 29387: Stringify exceptions for other background job modules

Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
21.11/bug30761
Jonathan Druart 2 years ago
parent
commit
e34fa5b511
  1. 2
      Koha/BackgroundJob/BatchCancelHold.pm
  2. 2
      Koha/BackgroundJob/BatchDeleteAuthority.pm
  3. 2
      Koha/BackgroundJob/BatchDeleteBiblio.pm
  4. 2
      Koha/BackgroundJob/BatchUpdateAuthority.pm

2
Koha/BackgroundJob/BatchCancelHold.pm

@ -94,7 +94,7 @@ sub process {
biblio_id => defined $biblio ? $biblio->biblionumber : '',
hold_id => $hold_id,
error => defined $hold
? ( $@ ? $@ : 0 )
? ( $@ ? "$@" : 0 )
: 'hold_not_found',
};
}

2
Koha/BackgroundJob/BatchDeleteAuthority.pm

@ -57,7 +57,7 @@ sub process {
type => 'error',
code => 'authority_not_deleted',
authid => $authid,
error => ($@ ? $@ : 0),
error => "$@",
};
$schema->storage->txn_rollback;
next;

2
Koha/BackgroundJob/BatchDeleteBiblio.pm

@ -101,7 +101,7 @@ sub process {
code => 'reserve_not_cancelled',
biblionumber => $biblionumber,
reserve_id => $hold->reserve_id,
error => $@,
error => "$@",
};
$schema->storage->txn_rollback;
$job->progress( ++$job_progress )->store;

2
Koha/BackgroundJob/BatchUpdateAuthority.pm

@ -90,7 +90,7 @@ sub process {
type => 'error',
code => 'authority_not_modified',
authid => $authid,
error => ($@ ? $@ : 0),
error => ($@ ? "$@" : 0),
};
} else {
push @messages, {

Loading…
Cancel
Save