diff options
author | Robin Appelman <robin@icewind.nl> | 2021-02-08 19:14:27 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-02-09 13:15:22 +0100 |
commit | ec875227ec494edb619eee5b413d2e4dd344b4cb (patch) | |
tree | d8253c67954f94f80424c67cf5355a4a59cc854c /lib/private/Console | |
parent | 3401be216d6b0f147e0a5655a7750fa5eb4012e3 (diff) | |
download | nextcloud-server-ec875227ec494edb619eee5b413d2e4dd344b4cb.tar.gz nextcloud-server-ec875227ec494edb619eee5b413d2e4dd344b4cb.zip |
forward query exception when fallback construction fails
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Console')
-rw-r--r-- | lib/private/Console/Application.php | 6 |
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"); } |