mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 21:31:13 +01:00
Catch exception in more places
This commit is contained in:
parent
a89a201c71
commit
b6865b130b
@ -39,7 +39,11 @@ class AlgebraAnalyzer
|
||||
PhpParser\Node $stmt,
|
||||
array $new_assigned_var_ids
|
||||
) {
|
||||
$negated_formula2 = Algebra::negateFormula($formula2);
|
||||
try {
|
||||
$negated_formula2 = Algebra::negateFormula($formula2);
|
||||
} catch (\Psalm\Exception\ComplicatedExpressionException $e) {
|
||||
return;
|
||||
}
|
||||
|
||||
$formula1_hashes = [];
|
||||
|
||||
|
@ -243,7 +243,11 @@ class IfAnalyzer
|
||||
// define this before we alter local claues after reconciliation
|
||||
$if_scope->reasonable_clauses = $if_context->clauses;
|
||||
|
||||
$if_scope->negated_clauses = Algebra::negateFormula($if_clauses);
|
||||
try {
|
||||
$if_scope->negated_clauses = Algebra::negateFormula($if_clauses);
|
||||
} catch (\Psalm\Exception\ComplicatedExpressionException $e) {
|
||||
$if_scope->negated_clauses = [];
|
||||
}
|
||||
|
||||
$if_scope->negated_types = Algebra::getTruthsFromFormula(
|
||||
Algebra::simplifyCNF(
|
||||
|
Loading…
x
Reference in New Issue
Block a user