From: G. Richardson Date: Thu, 21 Jul 2016 12:31:48 +0000 (+0200) Subject: SL/DB/BankTransaction.pm - carp statt die X-Git-Tag: release-3.5.4~2181 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=68ccd089c525fd41d00266fe493cd52a9dbb6513;p=kivitendo-erp.git SL/DB/BankTransaction.pm - carp statt die --- 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 = (