From: Mike Taylor Date: Wed, 19 Dec 2012 12:07:35 +0000 (+0000) Subject: Fix handling of piggybacking errors not to break on success! X-Git-Url: http://git.indexdata.com/?p=irspy-moved-to-github.git;a=commitdiff_plain;h=b232d3d162162349b89a9c98c94e60e2bd98e678 Fix handling of piggybacking errors not to break on success! --- diff --git a/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm b/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm index 9b62142..47a3f08 100644 --- a/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm +++ b/lib/ZOOM/IRSpy/Test/Record/PiggyBack.pm @@ -44,7 +44,10 @@ sub start { sub completed_search { my($conn, $task, $udata, $event) = @_; - if ($event->isa("ZOOM::Exception") && $event->code() == 1005) { + # $event can be a ZOOM::Event::* number or a ZOOM::Exception object + if (ref $event && + $event->isa("ZOOM::Exception") && + $event->code() == 1005) { $conn->log("irspy_test", "Piggyback searching not supported"); $conn->record()->store_result('piggyback', 'ok' => 0); return ZOOM::IRSpy::Status::TEST_BAD;