Skip to content

Commit

Permalink
Merge pull request #7384 from tm1000/bugfix/catch-additional-InvalidA…
Browse files Browse the repository at this point in the history
…rgumentException

Catch additional InvalidArgumentException
  • Loading branch information
orklah committed Jan 15, 2022
2 parents 9a9243e + 6910461 commit 4e27889
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Psalm/Internal/LanguageServer/Server/TextDocument.php
Expand Up @@ -6,6 +6,7 @@

use Amp\Promise;
use Amp\Success;
use InvalidArgumentException;
use LanguageServerProtocol\CompletionList;
use LanguageServerProtocol\Hover;
use LanguageServerProtocol\Location;
Expand Down Expand Up @@ -367,7 +368,7 @@ public function codeAction(TextDocumentIdentifier $textDocument, Range $range):

try {
$this->codebase->analyzer->analyzeFiles($this->project_analyzer, 1, false);
} catch (UnexpectedValueException $e) {
} catch (UnexpectedValueException | InvalidArgumentException $e) {
error_log('codeAction errored on file ' . $file_path. ', Reason: '.$e->getMessage());
return new Success(null);
}
Expand Down

0 comments on commit 4e27889

Please sign in to comment.