Various code cleanup.

This commit is contained in:
James Cole
2021-04-07 07:28:43 +02:00
parent 4ddcb0c965
commit f12744ad8c
180 changed files with 714 additions and 721 deletions

View File

@@ -102,17 +102,17 @@ class TransactionFactory
];
try {
$result = Transaction::create($data);
// @codeCoverageIgnoreStart
} catch (QueryException $e) {
Log::error(sprintf('Could not create transaction: %s', $e->getMessage()), $data);
Log::error($e->getMessage());
Log::error($e->getTraceAsString());
throw new FireflyException('Query exception when creating transaction.');
throw new FireflyException('Query exception when creating transaction.', 0, $e);
}
if (null === $result) {
throw new FireflyException('Transaction is NULL.');
}
// @codeCoverageIgnoreEnd
if (null !== $result) {
Log::debug(
sprintf(