mirror of
https://github.com/nextcloud/server.git
synced 2026-02-18 18:28:50 -05:00
forward original query exception when querying by name fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
26a20ed13f
commit
3401be216d
1 changed files with 6 additions and 1 deletions
|
|
@ -93,7 +93,12 @@ class SimpleContainer implements ArrayAccess, ContainerInterface, IContainer {
|
|||
|
||||
if ($parameterType !== null && !$parameterType->isBuiltin()) {
|
||||
$resolveName = $parameter->getName();
|
||||
return $this->query($resolveName);
|
||||
try {
|
||||
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(), $e2->getCode(), $e);
|
||||
}
|
||||
}
|
||||
|
||||
throw $e;
|
||||
|
|
|
|||
Loading…
Reference in a new issue