Skip to content

Commit

Permalink
Catch additional InvalidArgumentException
Browse files Browse the repository at this point in the history
  • Loading branch information
tm1000 committed Jan 12, 2022
1 parent 0463c6c commit 6910461
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Psalm/Internal/LanguageServer/Server/TextDocument.php
Original file line number Diff line number Diff line change
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 6910461

Please sign in to comment.