[Rt-commit] r9403 - in rtir/branches/2.3-EXPERIMENTAL: .

sartak at bestpractical.com sartak at bestpractical.com
Mon Oct 22 16:39:25 EDT 2007


Author: sartak
Date: Mon Oct 22 16:39:24 2007
New Revision: 9403

Modified:
   rtir/branches/2.3-EXPERIMENTAL/   (props changed)
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Elements/GetEmailFromIP

Log:
 r44011 at onn:  sartak | 2007-10-22 16:39:12 -0400
 Include an error message if the user tries to use an unknown field name


Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Elements/GetEmailFromIP
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Elements/GetEmailFromIP	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Tools/Elements/GetEmailFromIP	Mon Oct 22 16:39:24 2007
@@ -26,6 +26,7 @@
 # $address is passed by reference
 
 # Net::Whois::RIPE does this for its method names
+my $orig_field = $field;
 $field =~ tr/-/_/;
 
 $$address = loc("ADDRESS_UNKNOWN");
@@ -37,6 +38,9 @@
   if ($query->can($field)) {
     $$address = $query->$field();
   }
+  else {
+    $$error = "Whois server response did not include field '$orig_field'";
+  }
 } else {
   $$error = "Unable to connect to whois server '$server'";
 }


More information about the Rt-commit mailing list