- Attached a new exc eption message whenever an attribute is missing
This commit is contained in:
parent
87b9ea2e2a
commit
d92bb527da
|
@ -40,11 +40,16 @@ class AnnotationReader
|
||||||
|
|
||||||
if ( $reflect->getAttributes() ) {
|
if ( $reflect->getAttributes() ) {
|
||||||
foreach($reflect->getAttributes() as $attr) {
|
foreach($reflect->getAttributes() as $attr) {
|
||||||
$tags[] = [
|
try {
|
||||||
'tag' => substr(strrchr($attr->getName(), "\\"), 1),
|
$tags[] = [
|
||||||
'arguments' => $attr->getArguments(),
|
'tag' => substr(strrchr($attr->getName(), "\\"), 1),
|
||||||
'object' => $attr->newInstance(),
|
'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 {
|
else {
|
||||||
|
|
Loading…
Reference in New Issue