mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Catch type exception when fixing local type
This commit is contained in:
parent
81f167df65
commit
6abbc23947
@ -70,11 +70,15 @@ class CommentChecker
|
||||
throw new IncorrectDocblockException('Misplaced variable');
|
||||
}
|
||||
|
||||
$var_type_string = Type::fixUpLocalType(
|
||||
$line_parts[0],
|
||||
$aliases,
|
||||
$template_types
|
||||
);
|
||||
try {
|
||||
$var_type_string = Type::fixUpLocalType(
|
||||
$line_parts[0],
|
||||
$aliases,
|
||||
$template_types
|
||||
);
|
||||
} catch (TypeParseTreeException $e) {
|
||||
throw new DocblockParseException($line_parts[0] . ' is not a valid type');
|
||||
}
|
||||
|
||||
$original_type = $line_parts[0];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user