[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/3] DhcpWatch: Print what is wrong with the line.



Konrad Rzeszutek Wilk writes ("[PATCH 1/3] DhcpWatch: Print what is wrong with 
the line."):
> If the user forgot to include 'dhcp3' on the parameter
> line point out the error to the user.

How about this ?

From 693471df9e9a2a491a576ae644d02751906a63cf Mon Sep 17 00:00:00 2001
From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Date: Wed, 26 Oct 2016 14:14:07 -0400
Subject: [OSSTEST PATCH] DhcpWatch: Print what is wrong with the line.

If the user forgot to include 'dhcp3' on the parameter
line point out the error to the user.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
v2: Still print out the arguments to the constructor, hopefully
    non-confusingly.
---
 Osstest/DhcpWatch/leases.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Osstest/DhcpWatch/leases.pm b/Osstest/DhcpWatch/leases.pm
index b74ebf0..98c22b9 100644
--- a/Osstest/DhcpWatch/leases.pm
+++ b/Osstest/DhcpWatch/leases.pm
@@ -40,7 +40,8 @@ BEGIN {
 
 sub new {
     my ($class, $ho, $meth, $format, $source) = @_;
-    die "$format (@_) ?" unless $format eq 'dhcp3';
+    die "'$format' is missing dhcp3 in it! (args: @_) ?"
+       unless $format eq 'dhcp3';
     return bless {
        Format => $format,
        Source => $source,
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.