From: Michael Date: Fri, 15 May 2020 15:41:50 +0000 (+0000) Subject: Testmode added X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=89b47afb09068322322d528ab76bb5f4a6273cc7;p=friendica.git Testmode added --- diff --git a/src/Database/Database.php b/src/Database/Database.php index faa83d89e0..7adb88ffa8 100644 --- a/src/Database/Database.php +++ b/src/Database/Database.php @@ -740,6 +740,10 @@ class Database $error = $this->error; $errorno = $this->errorno; + if ($this->testmode) { + throw new Exception(DI::l10n()->t('Database error %d "%s" at "%s"', $errorno, $error, $this->replaceParameters($sql, $params))); + } + $this->logger->error('DB Error', [ 'code' => $this->errorno, 'error' => $this->error,