From 68ccd089c525fd41d00266fe493cd52a9dbb6513 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Thu, 21 Jul 2016 14:31:48 +0200 Subject: [PATCH] SL/DB/BankTransaction.pm - carp statt die --- SL/DB/BankTransaction.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SL/DB/BankTransaction.pm b/SL/DB/BankTransaction.pm index 1c2a6dc7f..053abb410 100644 --- a/SL/DB/BankTransaction.pm +++ b/SL/DB/BankTransaction.pm @@ -8,6 +8,7 @@ use strict; use SL::DB::MetaSetup::BankTransaction; use SL::DB::Manager::BankTransaction; use SL::DB::Helper::LinkedRecords; +use Carp; require SL::DB::Invoice; require SL::DB::PurchaseInvoice; @@ -49,7 +50,7 @@ sub linked_invoices { sub get_agreement_with_invoice { my ($self, $invoice) = @_; - die "first argument is not an invoice object" + carp "get_agreement_with_invoice needs an invoice object as its first argument" unless ref($invoice) eq 'SL::DB::Invoice' or ref($invoice) eq 'SL::DB::PurchaseInvoice'; my %points = ( -- 2.20.1