From 8f2e5d627d5d64808520e6dd8fff91e80dfc8b1b Mon Sep 17 00:00:00 2001 From: Mike Taylor Date: Thu, 20 Dec 2007 12:31:09 +0000 Subject: [PATCH] Constructor fails politely (warns and returns undef) if the registry search fails, whereas previously it would throw an exception which, uncaught, would stop the overnight IRSpy run. The junk ID in question is //lucasportal.info/blogs/payday-usa">'night:G'night/Illepeliz (sic) which yields BIB-1 diagnostic 108 "Malformed query" on irspy.indexdata.com but NOT on my development box, for reason that I do not yet understand. --- lib/ZOOM/IRSpy/Connection.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/ZOOM/IRSpy/Connection.pm b/lib/ZOOM/IRSpy/Connection.pm index 61aa856..0d68df2 100644 --- a/lib/ZOOM/IRSpy/Connection.pm +++ b/lib/ZOOM/IRSpy/Connection.pm @@ -1,4 +1,4 @@ -# $Id: Connection.pm,v 1.19 2007-12-18 11:59:42 mike Exp $ +# $Id: Connection.pm,v 1.20 2007-12-20 12:31:09 mike Exp $ package ZOOM::IRSpy::Connection; @@ -51,7 +51,11 @@ sub create { eval { $rs = $irspy->{conn}->search(new ZOOM::Query::CQL($query)); }; if ($@) { - die "registry search for record '$id' had error: '$@'"; + # This should be a "can't happen", but junk entries such as + # //lucasportal.info/blogs/payday-usa">'night:G'night/Illepeliz + # (yes, really) yield BIB-1 diagnostic 108 "Malformed query" + warn "registry search for record '$id' had error: '$@'"; + return undef; } my $n = $rs->size(); $this->log("irspy", "query '$query' found $n record", $n==1 ? "" : "s"); -- 1.7.10.4