mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
Merge pull request #11316 from nextcloud/container-queryexception-only
only catch QueryException when trying to build class
This commit is contained in:
commit
b8418b502d
1 changed files with 1 additions and 7 deletions
|
|
@ -66,13 +66,7 @@ class SimpleContainer extends Container implements IContainer {
|
|||
|
||||
try {
|
||||
$parameters[] = $this->query($resolveName);
|
||||
} catch (\Exception $e) {
|
||||
if (class_exists('PHPUnit_Framework_AssertionFailedError', false) &&
|
||||
$e instanceof \PHPUnit_Framework_AssertionFailedError) {
|
||||
// Easier debugging of "Your test case is not allowed to access the database."
|
||||
throw $e;
|
||||
}
|
||||
|
||||
} catch (QueryException $e) {
|
||||
// Service not found, use the default value when available
|
||||
if ($parameter->isDefaultValueAvailable()) {
|
||||
$parameters[] = $parameter->getDefaultValue();
|
||||
|
|
|
|||
Loading…
Reference in a new issue