Update error catch

This commit is contained in:
James Cole
2022-11-01 19:24:34 +01:00
parent e7e3370baa
commit ebcf9b3be1
5 changed files with 10 additions and 6 deletions

View File

@@ -27,6 +27,7 @@ use Exception;
use FireflyIII\Models\Transaction;
use FireflyIII\Models\TransactionJournal;
use Illuminate\Console\Command;
use Illuminate\Database\QueryException;
use Log;
use stdClass;
@@ -147,7 +148,7 @@ class DeleteOrphanedTransactions extends Command
if ($journal) {
try {
$journal->delete();
} catch (Exception $e) {
} catch (QueryException $e) {
Log::info(sprintf('Could not delete journal %s', $e->getMessage()));
}
}