Cuttlefish: Log an error and close on !isOk()

Bug: 170189916
Test: device health tests
Change-Id: I784dfcb7fe9f92158406531582029770bc55679e
diff --git a/test/rootcanal/bluetooth_hci.cc b/test/rootcanal/bluetooth_hci.cc
index 908554b..963f1a7 100644
--- a/test/rootcanal/bluetooth_hci.cc
+++ b/test/rootcanal/bluetooth_hci.cc
@@ -112,8 +112,11 @@
         hidl_vec<uint8_t> hci_event(packet->begin(), packet->end());
         auto ret = cb->hciEventReceived(hci_event);
         if (!ret.isOk()) {
-          CHECK(death_recipient_->getHasDied())
-              << "Error sending event callback, but no death notification.";
+          LOG_ERROR("Error sending event callback");
+          if (!death_recipient_->getHasDied()) {
+            LOG_ERROR("Closing");
+            close();
+          }
         }
       });
 
@@ -122,8 +125,11 @@
         hidl_vec<uint8_t> acl_packet(packet->begin(), packet->end());
         auto ret = cb->aclDataReceived(acl_packet);
         if (!ret.isOk()) {
-          CHECK(death_recipient_->getHasDied())
-              << "Error sending acl callback, but no death notification.";
+          LOG_ERROR("Error sending acl callback");
+          if (!death_recipient_->getHasDied()) {
+            LOG_ERROR("Closing");
+            close();
+          }
         }
       });
 
@@ -132,8 +138,11 @@
         hidl_vec<uint8_t> sco_packet(packet->begin(), packet->end());
         auto ret = cb->aclDataReceived(sco_packet);
         if (!ret.isOk()) {
-          CHECK(death_recipient_->getHasDied())
-              << "Error sending sco callback, but no death notification.";
+          LOG_ERROR("Error sending sco callback");
+          if (!death_recipient_->getHasDied()) {
+            LOG_ERROR("Closing");
+            close();
+          }
         }
       });
 
@@ -143,8 +152,11 @@
           hidl_vec<uint8_t> iso_packet(packet->begin(), packet->end());
           auto ret = cb_1_1->isoDataReceived(iso_packet);
           if (!ret.isOk()) {
-            CHECK(death_recipient_->getHasDied())
-                << "Error sending iso callback, but no death notification.";
+            LOG_ERROR("Error sending iso callback");
+            if (!death_recipient_->getHasDied()) {
+              LOG_ERROR("Closing");
+              close();
+            }
           }
         });
   }