From f27b1f4819fac91b1dce3a7bf25945f479b7b908 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Fri, 27 Nov 2020 17:25:06 +0100 Subject: [PATCH] Inventory Helper: Fehlerhaften Aufruf mit croak abbrechen statt mit Excception --- SL/Helper/Inventory.pm | 10 ++-------- locale/de/all | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/SL/Helper/Inventory.pm b/SL/Helper/Inventory.pm index eb18305c8..11857fecf 100644 --- a/SL/Helper/Inventory.pm +++ b/SL/Helper/Inventory.pm @@ -152,14 +152,8 @@ sub get_onhand { sub allocate { my (%params) = @_; - die SL::X::Inventory::Allocation->new( - error => 'allocate needs a part', - msg => t8("Method allocate needs the parameter 'part'"), - ) unless $params{part}; - die SL::X::Inventory::Allocation->new( - error => 'allocate needs a qty', - msg => t8("Method allocate needs the parameter 'qty'"), - ) unless $params{qty}; + croak('allocate needs a qty') unless $params{part}; + croak('allocate needs a qty') unless $params{qty}; my $part = $params{part}; my $qty = $params{qty}; diff --git a/locale/de/all b/locale/de/all index 202108d70..4f3384afd 100755 --- a/locale/de/all +++ b/locale/de/all @@ -1963,8 +1963,6 @@ $self->{texts} = { 'Meta tag keywords' => 'Metatag Keywords', 'Meta tag title' => 'Metatag Titel', 'Method' => 'Verfahren', - 'Method allocate needs the parameter \'part\'' => 'Es fehlt der Parameter \'part\'', - 'Method allocate needs the parameter \'qty\'' => 'Es fehlt der Parameter \'qty\' oder die Menge ist 0', 'Microfiche' => 'Mikrofilm', 'Minimum Amount' => 'Mindestbetrag', 'Miscellaneous' => 'Verschiedenes', -- 2.20.1