Add debug information.

This commit is contained in:
James Cole
2020-02-22 11:05:16 +01:00
parent 1d8f34275a
commit 6c163ebef3
10 changed files with 68 additions and 14 deletions

View File

@@ -26,6 +26,7 @@ namespace FireflyIII\Factory;
use FireflyIII\Exceptions\DuplicateTransactionException;
use FireflyIII\Models\TransactionGroup;
use FireflyIII\User;
use Log;
/**
* Class TransactionGroupFactory
@@ -60,7 +61,12 @@ class TransactionGroupFactory
$this->journalFactory->setUser($this->user);
$this->journalFactory->setErrorOnHash($data['error_if_duplicate_hash'] ?? false);
$collection = $this->journalFactory->create($data);
try {
$collection = $this->journalFactory->create($data);
} catch(DuplicateTransactionException $e) {
Log::warning('GroupFactory::create() caught journalFactory::create() with a duplicate!');
throw new DuplicateTransactionException($e->getMessage());
}
$title = $data['group_title'] ?? null;
$title = '' === $title ? null : $title;