From aa8ecb694dc85cb67e2c9f7b5fe911888d0310e4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 30 Jan 2009 11:47:58 -0800 Subject: Fix error handling when no bandwidth specified Bugfix 4075 Correctly report error message. --- lib/Vyatta/Qos/TrafficLimiter.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Vyatta/Qos') diff --git a/lib/Vyatta/Qos/TrafficLimiter.pm b/lib/Vyatta/Qos/TrafficLimiter.pm index 5c6abba..9b47be8 100644 --- a/lib/Vyatta/Qos/TrafficLimiter.pm +++ b/lib/Vyatta/Qos/TrafficLimiter.pm @@ -51,8 +51,8 @@ my @matches = (); my $rate = $config->returnValue("bandwidth"); + die "bandwidth must be defined for $level\n" unless $rate; $self->{rate} = getRate($rate); - defined $rate or die "bandwidth must be defined for $level\n"; $self->{burst} = $config->returnValue("burst"); defined $self->{burst} or die "burst must be defined for $level\n"; -- cgit v1.2.3