mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Add debug information.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user