From 9cd9f9b84f13b7df5920725dc4eb2c4040fd01f7 Mon Sep 17 00:00:00 2001 From: Markus Staab Date: Thu, 28 Nov 2024 11:14:09 +0100 Subject: [PATCH] Improve error message --- generator/src/PhpStanFunctions/PhpStanType.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/src/PhpStanFunctions/PhpStanType.php b/generator/src/PhpStanFunctions/PhpStanType.php index bf0e8fdb..1a9f3dfb 100644 --- a/generator/src/PhpStanFunctions/PhpStanType.php +++ b/generator/src/PhpStanFunctions/PhpStanType.php @@ -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, '?');