[open-ils-commits] r8820 -
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Feb 22 10:53:36 EST 2008
Author: erickson
Date: 2008-02-22 10:22:54 -0500 (Fri, 22 Feb 2008)
New Revision: 8820
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm
Log:
moved to die_events for in-transaction error handling
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm 2008-02-22 15:21:10 UTC (rev 8819)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Cat/Merge.pm 2008-02-22 15:22:54 UTC (rev 8820)
@@ -114,16 +114,15 @@
$vol->edit_date('now');
$vol->record( $master );
$editor->update_asset_call_number($vol)
- or return $editor->event;
+ or return $editor->die_event;
}
}
# cycle through and delete the non-master records
for my $rec (@recs) {
- my ($record, $evt) =
- $editor->retrieve_biblio_record_entry($rec);
- return $evt if $evt;
+ my $record = $editor->retrieve_biblio_record_entry($rec)
+ or return $editor->die_event;
$logger->debug("merge: seeing if record $rec needs to be deleted or un-deleted");
@@ -135,7 +134,7 @@
$record->editor($reqr->id);
$record->edit_date('now');
$editor->update_biblio_record_entry($record, {checkperm => 1})
- or return $editor->event;
+ or return $editor->die_event;
}
} else {
@@ -144,7 +143,7 @@
$record->editor($reqr->id);
$record->edit_date('now');
$editor->update_biblio_record_entry($record, {checkperm => 1})
- or return $editor->event;
+ or return $editor->die_event;
}
}
@@ -207,7 +206,7 @@
$copy->call_number($bigcn);
$copy->editor($editor->requestor->id);
$copy->edit_date('now');
- $editor->update_asset_copy($copy) or return (undef, $editor->event);
+ $editor->update_asset_copy($copy) or return (undef, $editor->die_event);
}
}
@@ -217,8 +216,8 @@
$_->deleted('t');
$_->editor($editor->requestor->id);
$_->edit_date('now');
- return (undef,$editor->event) unless $editor->allowed('UPDATE_VOLUME', $_->owning_lib);
- $editor->update_asset_call_number($_) or return (undef, $editor->event);
+ return (undef,$editor->die_event) unless $editor->allowed('UPDATE_VOLUME', $_->owning_lib);
+ $editor->update_asset_call_number($_) or return (undef, $editor->die_event);
}
my ($mvol) = grep { $_->id == $bigcn } @$volumes;
More information about the open-ils-commits
mailing list