зеркало из https://github.com/nextcloud/spreed.git
Better command debuggin
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Родитель
1f965d5590
Коммит
ab585c73bc
|
@ -198,7 +198,7 @@ class Executor {
|
||||||
);
|
);
|
||||||
} catch (\InvalidArgumentException $e) {
|
} catch (\InvalidArgumentException $e) {
|
||||||
$this->logger->logException($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.');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ class ShellExecutor {
|
||||||
@exec($cmd, $output, $returnCode);
|
@exec($cmd, $output, $returnCode);
|
||||||
|
|
||||||
if ($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);
|
return implode("\n", $output);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче