Skip to content

Commit

Permalink
Merge pull request #389 from mopahle/master
Browse files Browse the repository at this point in the history
Improve exception message
  • Loading branch information
mnapoli committed Mar 4, 2016
2 parents 0ca02e4 + d5bff80 commit b3fb555
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DI/Definition/Helper/ObjectDefinitionHelper.php
Expand Up @@ -264,7 +264,7 @@ private function fixParameters(ObjectDefinition $definition, $method, $parameter
try {
$reflectionParameter = new \ReflectionParameter($callable, $index);
} catch (\ReflectionException $e) {
throw DefinitionException::create($definition, "Parameter with name '$index' could not be found");
throw DefinitionException::create($definition, sprintf("Parameter with name '%s' could not be found. %s.", $index, $e->getMessage()));
}

$index = $reflectionParameter->getPosition();
Expand Down

0 comments on commit b3fb555

Please sign in to comment.