[or-cvs] r14855: (ticket:81) Providing potential error handling (torstatus/trunk)

kasimir at seul.org kasimir at seul.org
Sat May 31 06:05:17 UTC 2008


Author: kasimir
Date: 2008-05-31 02:05:17 -0400 (Sat, 31 May 2008)
New Revision: 14855

Modified:
   torstatus/trunk/tns_update.pl
Log:
(ticket:81) Providing potential error handling

Modified: torstatus/trunk/tns_update.pl
===================================================================
--- torstatus/trunk/tns_update.pl	2008-05-31 05:56:52 UTC (rev 14854)
+++ torstatus/trunk/tns_update.pl	2008-05-31 06:05:17 UTC (rev 14855)
@@ -119,6 +119,11 @@
 # Determine if the GeoIP database should be automatically updated
 if ($config{'AutomaticallyUpdateGeoIPDatbase'} eq "yes")
 {
+	# Handle any potential error so as not to stall the
+	# network updating
+	eval
+	{
+
 	# Query the last set date from the database
 	$query = "SElECT geoip FROM Status LIMIT 1;";
 	$dbresponse = $dbh->prepare($query);
@@ -160,6 +165,12 @@
 			$dbresponse->execute();
 		}
 	}
+
+	};
+	if ($@)
+	{
+		print "The GeoIP database could not be updated.  An error is occuring.\n";
+	}
 }
 
 # Determine whether or not the mirror list needs to be updated



More information about the tor-commits mailing list