added exception for when trying to send to non-existant recipient
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 25 Jul 2005 01:34:06 +0000 (01:34 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Mon, 25 Jul 2005 01:34:06 +0000 (01:34 +0000)
this will prevent some of the vague 'no app_session returned from server build' errors

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@421 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Transport.pm

index f669dbe..09950fd 100644 (file)
@@ -90,6 +90,12 @@ sub handler {
        my $body        = $helper->get_body();
        my $type        = $helper->get_msg_type();
 
+
+       if (defined($type) and $type eq 'error') {
+               throw OpenSRF::EX::Session ("$remote_id IS NOT CONNECTED TO THE NETWORK!!!");
+
+       }
+
        $logger->transport( 
                        "Transport building/retrieving session: $service, $remote_id, $sess_id", DEBUG );