summaryrefslogtreecommitdiffstats
path: root/lib/private/Console/Application.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Console/Application.php')
-rw-r--r--lib/private/Console/Application.php6
1 files changed, 5 insertions, 1 deletions
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");
}