diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
index 62ffeb1000ae7af93b36d19cbdfa514351f20d28..0ac050c23554cea2fe0312022322bf060119a620 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
@@ -238,8 +238,8 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
             // set communication enoding to utf8
             $this->db->exec("SET NAMES utf8");
         } catch (PDOException $e) {
-            echo 'Connection failed: ' . $e->getMessage();
             $this->debug('Connection failed: ' . $e->getMessage());
+            throw new ILSException($e->getMessage);
         }
 
         $this->debug('Connected to DB');
@@ -687,6 +687,7 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
             $sqlStmtHoldings->execute([':id' => $id]);
         } catch (PDOException $e) {
             $this->debug('Connection failed: ' . $e->getMessage());
+            throw new ILSException($e->getMessage);
         }
 
         $this->debug("Rows count: " . $itemSqlStmt->rowCount());