]> git.mxchange.org Git - friendica.git/commitdiff
Testmode added
authorMichael <heluecht@pirati.ca>
Fri, 15 May 2020 15:41:50 +0000 (15:41 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 15 May 2020 15:41:50 +0000 (15:41 +0000)
src/Database/Database.php

index faa83d89e0c8504288f356291f56a7570cd129a3..7adb88ffa87aec4c6d1cff7025b9b28ffc0a9596 100644 (file)
@@ -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,