Skip to content

Commit

Permalink
Update exception messages
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyShepherd committed Mar 11, 2017
1 parent e5288dd commit 251fe67
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Factory/Reflection/ReflectionMethodFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,11 @@ protected function addParamAnnotation($name, $value) : void

if (!$this->parameters->containsKey($param))
{
throw new \Exception();
throw new \Exception
(
'Tried to set param annotation for non existant '
. 'parameter: ' . $param
);
}

$comparator = new TypeComparator();
Expand All @@ -162,7 +166,7 @@ protected function addParamAnnotation($name, $value) : void

if (!$comparator->compatible($nativeType, $type))
{
throw new \Exception();
throw new \Exception('Types are incompatible');
}

$param->setRawValue('type', $type);
Expand Down

0 comments on commit 251fe67

Please sign in to comment.