Improve dependency injection error message

Change from display the name of the parameter to the type of the
parameter. This is that in most cases is usefull.

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
pull/35537/head
Carl Schwan 3 years ago
parent 5f3585d817
commit 2a864ec13c
  1. 2
      lib/private/AppFramework/Utility/SimpleContainer.php

@ -108,7 +108,7 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
return $this->query($resolveName);
} catch (QueryException $e2) {
// don't lose the error we got while trying to query by type
throw new QueryException($e2->getMessage(), (int) $e2->getCode(), $e);
throw new QueryException($e->getMessage(), (int) $e->getCode(), $e);
}
}

Loading…
Cancel
Save