Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-09-04 13:57:54 +0300
committerJoas Schilling <coding@schilljs.com>2019-09-04 13:57:54 +0300
commitab585c73bcb869e80ac6a7f197e2f27ac7832e14 (patch)
tree3d5ac20876af0735cc107781e3816c973d272d37 /lib
parent1f965d5590640933e74084102413ba4668942af7 (diff)
Better command debuggin
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/Chat/Command/Executor.php2
-rw-r--r--lib/Chat/Command/ShellExecutor.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/Chat/Command/Executor.php b/lib/Chat/Command/Executor.php
index cfe8d8e53..a04b4c268 100644
--- a/lib/Chat/Command/Executor.php
+++ b/lib/Chat/Command/Executor.php
@@ -198,7 +198,7 @@ class Executor {
);
} catch (\InvalidArgumentException $e) {
$this->logger->logException($e);
- return '';
+ return $this->l->t('An error occurred while running the command. Please ask an administrator to check the logs.');
}
}
}
diff --git a/lib/Chat/Command/ShellExecutor.php b/lib/Chat/Command/ShellExecutor.php
index b2a735d92..358ddcc72 100644
--- a/lib/Chat/Command/ShellExecutor.php
+++ b/lib/Chat/Command/ShellExecutor.php
@@ -103,7 +103,7 @@ class ShellExecutor {
@exec($cmd, $output, $returnCode);
if ($returnCode) {
- throw new \InvalidArgumentException('Chat command failed with return code: ' . $returnCode);
+ throw new \InvalidArgumentException('Chat command failed [Code: ' . $returnCode . ']: ' . $cmd);
}
return implode("\n", $output);