summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-09-25 16:21:55 +0200
committerGitHub <noreply@github.com>2018-09-25 16:21:55 +0200
commitb8418b502da59eec1b16ff66d87e35b4d146a761 (patch)
tree1e557359ed526061408c78931e22aa2691976523
parent4a59725b15b9173bd7a761604ba633bf38a203a4 (diff)
parentdccbdc8c012a2909fc71e9a23b70fe87e4f97f2b (diff)
downloadnextcloud-server-b8418b502da59eec1b16ff66d87e35b4d146a761.tar.gz
nextcloud-server-b8418b502da59eec1b16ff66d87e35b4d146a761.zip
Merge pull request #11316 from nextcloud/container-queryexception-only
only catch QueryException when trying to build class
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index e96f24ed284..47a6f95f747 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -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();