removed try-catch in favor of cleaner code
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 21:35:14 +0000 (21:35 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 1 Sep 2006 21:35:14 +0000 (21:35 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5850 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm

index 60ed998..a41b892 100644 (file)
@@ -244,6 +244,7 @@ sub retrieve_payments {
 }
 
 
+
 __PACKAGE__->register_method(
        method  => "retrieve_payments2",
        api_name        => "open-ils.circ.money.payment.retrieve.all",
@@ -264,9 +265,8 @@ sub retrieve_payments2 {
                my $meth = "retrieve_money_$type";
                my $p = $e->$meth($_->id) or return $e->event;
                $p->payment_type($type);
-               try {
-                       $p->cash_drawer($e->retrieve_actor_workstation($p->cash_drawer));
-               } catch Error with {};
+               $p->cash_drawer($e->retrieve_actor_workstation($p->cash_drawer))
+                       if $p->has_field('cash_drawer');
                push( @payments, $p );
        }