Skip to content

Commit

Permalink
Improve error message
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Nov 28, 2024
1 parent 22779a0 commit 9cd9f9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/src/PhpStanFunctions/PhpStanType.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct(string $data, bool $writeOnly = false)
/** @var int $count */
$count = \count($returnTypes);
if ($count === 0) {
throw new \RuntimeException('Error when trying to extract parameter type');
throw new \RuntimeException('Error when trying to extract parameter type: '.$data);
}
foreach ($returnTypes as &$returnType) {
$pos = \strpos($returnType, '?');
Expand Down

0 comments on commit 9cd9f9b

Please sign in to comment.