- Attached a new exc eption message whenever an attribute is missing
This commit is contained in:
parent
87b9ea2e2a
commit
d92bb527da
|
@ -40,12 +40,17 @@ class AnnotationReader
|
|||
|
||||
if ( $reflect->getAttributes() ) {
|
||||
foreach($reflect->getAttributes() as $attr) {
|
||||
try {
|
||||
$tags[] = [
|
||||
'tag' => substr(strrchr($attr->getName(), "\\"), 1),
|
||||
'arguments' => $attr->getArguments(),
|
||||
'object' => $attr->newInstance(),
|
||||
];
|
||||
}
|
||||
catch(\Throwable $e) {
|
||||
throw new \Exception(sprintf("%s for %s in file '%s'", $e->getMessage(), $reflect, $this->class));
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
$namespace = $this->getObjectNamespace($reflect);
|
||||
|
|
Loading…
Reference in New Issue