logging an error if we can't connect to the z server
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 22:49:51 +0000 (22:49 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 16 Mar 2006 22:49:51 +0000 (22:49 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@3384 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm

index 19ec0f8..c053dda 100755 (executable)
@@ -150,6 +150,10 @@ sub z39_search_by_string {
                preferredRecordSyntax   => $output, 
        );
 
+       if(!$conn) {
+               $logger->error("Unable to create Z3950 connection: $hst, $prt, $db, $usr, $pw, $output");
+               return OpenILS::Event->new('UNKNOWN'); # XXX needs to be a real event
+       }
 
        my $rs = $conn->search( $search );
        return OpenILS::Event->new('Z3950_SEARCH_FAILED') unless $rs;