mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 11:48:05 +00:00
catch logic exception
This commit is contained in:
@@ -54,6 +54,7 @@ use Gdbots\QueryParser\QueryParser;
|
|||||||
use Illuminate\Pagination\LengthAwarePaginator;
|
use Illuminate\Pagination\LengthAwarePaginator;
|
||||||
use Illuminate\Support\Collection;
|
use Illuminate\Support\Collection;
|
||||||
use Log;
|
use Log;
|
||||||
|
use LogicException;
|
||||||
use TypeError;
|
use TypeError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -155,7 +156,7 @@ class OperatorQuerySearch implements SearchInterface
|
|||||||
$parser = new QueryParser();
|
$parser = new QueryParser();
|
||||||
try {
|
try {
|
||||||
$query1 = $parser->parse($query);
|
$query1 = $parser->parse($query);
|
||||||
} catch (TypeError $e) {
|
} catch (TypeError|LogicException $e) {
|
||||||
Log::error($e->getMessage());
|
Log::error($e->getMessage());
|
||||||
Log::error(sprintf('Could not parse search: "%s".', $query));
|
Log::error(sprintf('Could not parse search: "%s".', $query));
|
||||||
throw new FireflyException('Invalid search value. See the logs.', 0, $e);
|
throw new FireflyException('Invalid search value. See the logs.', 0, $e);
|
||||||
|
Reference in New Issue
Block a user