diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-26 10:03:31 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-07-26 10:03:31 +0200 |
commit | 5da813f477a9458a523c5470c2d18f2afb97af86 (patch) | |
tree | c6074f1841be3c21c080550b952a72a0528bc0db /settings | |
parent | 3b6bba09d47354aa937adac2ba72916622a6d67e (diff) | |
download | nextcloud-server-5da813f477a9458a523c5470c2d18f2afb97af86.tar.gz nextcloud-server-5da813f477a9458a523c5470c2d18f2afb97af86.zip |
Log exception that is thrown by internet connection check
Diffstat (limited to 'settings')
-rw-r--r-- | settings/Application.php | 3 | ||||
-rw-r--r-- | settings/Controller/CheckSetupController.php | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/settings/Application.php b/settings/Application.php index 657b3fe490a..6db5e2aabf6 100644 --- a/settings/Application.php +++ b/settings/Application.php @@ -174,7 +174,8 @@ class Application extends App { $c->query('URLGenerator'), $c->query('Util'), $c->query('L10N'), - $c->query('Checker') + $c->query('Checker'), + $c->query('Logger') ); }); diff --git a/settings/Controller/CheckSetupController.php b/settings/Controller/CheckSetupController.php index bfb83e91936..13e7e443621 100644 --- a/settings/Controller/CheckSetupController.php +++ b/settings/Controller/CheckSetupController.php @@ -36,6 +36,7 @@ use OCP\AppFramework\Http\RedirectResponse; use OCP\Http\Client\IClientService; use OCP\IConfig; use OCP\IL10N; +use OCP\ILogger; use OCP\IRequest; use OC_Util; use OCP\IURLGenerator; @@ -56,6 +57,8 @@ class CheckSetupController extends Controller { private $l10n; /** @var Checker */ private $checker; + /** @var ILogger */ + private $logger; /** * @param string $AppName @@ -66,6 +69,7 @@ class CheckSetupController extends Controller { * @param \OC_Util $util * @param IL10N $l10n * @param Checker $checker + * @param ILogger $logger */ public function __construct($AppName, IRequest $request, @@ -74,7 +78,8 @@ class CheckSetupController extends Controller { IURLGenerator $urlGenerator, \OC_Util $util, IL10N $l10n, - Checker $checker) { + Checker $checker, + ILogger $logger) { parent::__construct($AppName, $request); $this->config = $config; $this->clientService = $clientService; @@ -82,6 +87,7 @@ class CheckSetupController extends Controller { $this->urlGenerator = $urlGenerator; $this->l10n = $l10n; $this->checker = $checker; + $this->logger = $logger; } /** @@ -118,6 +124,7 @@ class CheckSetupController extends Controller { $client->get($httpSiteName); $client->get($httpsSiteName); } catch (\Exception $e) { + $this->logger->logException($e, ['app' => 'internet_connection_check']); return false; } return true; |