summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/files-checker.php1
-rw-r--r--lib/private/AppFramework/Utility/SimpleContainer.php7
-rw-r--r--lib/private/Console/Application.php6
3 files changed, 12 insertions, 2 deletions
diff --git a/build/files-checker.php b/build/files-checker.php
index 194ba546aec..5283d4e4c0e 100644
--- a/build/files-checker.php
+++ b/build/files-checker.php
@@ -23,6 +23,7 @@ $expectedFiles = [
'.',
'..',
'.codecov.yml',
+ '.devcontainer',
'.drone.yml',
'.editorconfig',
'.eslintrc.js',
diff --git a/lib/private/AppFramework/Utility/SimpleContainer.php b/lib/private/AppFramework/Utility/SimpleContainer.php
index f73e09e645e..2aa5da116e6 100644
--- a/lib/private/AppFramework/Utility/SimpleContainer.php
+++ b/lib/private/AppFramework/Utility/SimpleContainer.php
@@ -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(), (int) $e2->getCode(), $e);
+ }
}
throw $e;
diff --git a/lib/private/Console/Application.php b/lib/private/Console/Application.php
index 10c578f41e0..9b1cc57aed3 100644
--- a/lib/private/Console/Application.php
+++ b/lib/private/Console/Application.php
@@ -221,7 +221,11 @@ class Application {
$c = \OC::$server->query($command);
} catch (QueryException $e) {
if (class_exists($command)) {
- $c = new $command();
+ try {
+ $c = new $command();
+ } catch (\ArgumentCountError $e2) {
+ throw new \Exception("Failed to construct console command '$command': " . $e->getMessage(), 0, $e);
+ }
} else {
throw new \Exception("Console command '$command' is unknown and could not be loaded");
}