Testmode added

This commit is contained in:
Michael 2020-05-15 15:41:50 +00:00
parent 2138c4bb55
commit 89b47afb09

View file

@ -740,6 +740,10 @@ class Database
$error = $this->error; $error = $this->error;
$errorno = $this->errorno; $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', [ $this->logger->error('DB Error', [
'code' => $this->errorno, 'code' => $this->errorno,
'error' => $this->error, 'error' => $this->error,