Skip to content

Commit

Permalink
Improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
danog committed Jan 25, 2023
1 parent 247d30f commit 40a05d5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Psalm/Internal/Analyzer/CommentAnalyzer.php
Expand Up @@ -162,7 +162,7 @@ public static function arrayToDocblocks(
throw new DocblockParseException(
$line_parts[0] .
' is not a valid type' .
' (from ' .
' ('.$e->getMessage().' in ' .
$source->getFilePath() .
':' .
$comment->getStartLine() .
Expand Down
Expand Up @@ -1895,7 +1895,7 @@ private static function getTypeAliasesFromCommentLines(
$self_fqcln,
);
} catch (TypeParseTreeException $e) {
throw new DocblockParseException($type_string . ' is not a valid type');
throw new DocblockParseException($type_string . ' is not a valid type: '.$e->getMessage());
}

$type_alias_tokens[$type_alias] = new InlineTypeAlias($type_tokens);
Expand Down

0 comments on commit 40a05d5

Please sign in to comment.