You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The newly added Registry::container()->get($id) throws an exception if the interface cannot be found:
ReflectionException: Class "Cissee\WebtreesExt\MoreI18N" does not exist in C:\wamp64\www\webtrees\app\Container.php:81
Stack trace:
#0 C:\wamp64\www\webtrees\app\Container.php(81): ReflectionClass->__construct('Cissee\\Webtrees...')
#1 C:\wamp64\www\webtrees\app\Container.php(58): Fisharebest\Webtrees\Container->make('Cissee\\Webtrees...')
Shouldn't this exception be caught and get($id) could return null instead?
The text was updated successfully, but these errors were encountered:
o.k., I understand; thanks for providing the background! I did not know that a detailed specification is available.
My take away from the specification is that Registry::container()->get($id) should keep throwing an exception if the interface is not found. However, the specific exception should be: NotFoundExceptionInterface. In my example - which is not representative - a ReflectionException was thrown.
I recognized that webtrees already has a NotFoundInContainerException, which implements the proposed NotFoundExceptionInterface
Observed with webtrees 2.2.1
The newly added Registry::container()->get($id) throws an exception if the interface cannot be found:
Shouldn't this exception be caught and get($id) could return null instead?
The text was updated successfully, but these errors were encountered: