From a5148f5d187b2a70514d368a89ce85470e52d5cc Mon Sep 17 00:00:00 2001
From: Adam Vessey <adam@discoverygarden.ca>
Date: Mon, 3 Oct 2022 16:21:08 -0300
Subject: [PATCH] Cover ALL the exits.

---
 islandora.install | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/islandora.install b/islandora.install
index 5e1e3022..ab80af9c 100644
--- a/islandora.install
+++ b/islandora.install
@@ -201,6 +201,13 @@ function islandora_update_8007() {
     }
   }
   catch (ExtensionNameLengthException | MissingDependencyException $e) {
-    throw new UpdateException('Failed; ensure that the ctools module is available in the Drupal installation.');
+    throw new UpdateException('Failed; ensure that the ctools module is available in the Drupal installation.', 0, $e);
   }
+  catch (\Exception $e) {
+    throw new UpdateException('Failed; encountered an exception while trying to enable ctools.', 0, $e);
+  }
+
+  // Theoretically impossible to hit, as ModuleInstaller::install() only returns TRUE (or throws/propagates an exception), but...
+  // probably a good idea to have the here, just in case?
+  throw new UpdateException('Failed; hit the end of the update hook implementation, which is not expected.');
 }