Better handling of errors.

This commit is contained in:
James Cole
2020-03-12 05:06:42 +01:00
parent d92b741088
commit 5e8d94d16a
5 changed files with 141 additions and 54 deletions

View File

@@ -24,6 +24,7 @@ declare(strict_types=1);
namespace FireflyIII\Factory;
use FireflyIII\Exceptions\DuplicateTransactionException;
use FireflyIII\Exceptions\FireflyException;
use FireflyIII\Models\TransactionGroup;
use FireflyIII\User;
use Log;
@@ -60,7 +61,6 @@ class TransactionGroupFactory
{
$this->journalFactory->setUser($this->user);
$this->journalFactory->setErrorOnHash($data['error_if_duplicate_hash'] ?? false);
try {
$collection = $this->journalFactory->create($data);
} catch(DuplicateTransactionException $e) {