diff options
author | Julius Härtl <jus@bitgrid.net> | 2019-07-04 12:23:34 +0300 |
---|---|---|
committer | Julius Härtl <jus@bitgrid.net> | 2019-07-04 12:23:34 +0300 |
commit | 900e1d99d9e48dfc078c333879e7ae9ba3672ced (patch) | |
tree | 43d58ec1479428fc993daa1ef6a6eff1d035d859 /appinfo | |
parent | 1e341fae22711a4da6da4b06db76fd433d681950 (diff) |
Catch exceptions happening during service setup to avoid auto-disabling the app
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'appinfo')
-rw-r--r-- | appinfo/app.php | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/appinfo/app.php b/appinfo/app.php index e329d9f7..8a4c1a3c 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -27,13 +27,17 @@ $cli = false; if(OC::$CLI) { $cli = true; } - -$urlGenerator = \OC::$server->getURLGenerator(); -$l = \OC::$server->getL10N('user_saml'); -$config = \OC::$server->getConfig(); -$request = \OC::$server->getRequest(); -$userSession = \OC::$server->getUserSession(); -$session = \OC::$server->getSession(); +try { + $urlGenerator = \OC::$server->getURLGenerator(); + $l = \OC::$server->getL10N('user_saml'); + $config = \OC::$server->getConfig(); + $request = \OC::$server->getRequest(); + $userSession = \OC::$server->getUserSession(); + $session = \OC::$server->getSession(); +} catch (Throwable $e) { + \OC::$server->getLogger()->logException($e); + return; +} $samlSettings = new \OCA\User_SAML\SAMLSettings( $urlGenerator, $config, |