summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Schießle <bjoern@schiessle.org>2016-07-20 18:20:49 +0200
committerGitHub <noreply@github.com>2016-07-20 18:20:49 +0200
commit7cdf6402ff9a0e07866ca8bcfcffd0e0897b646a (patch)
tree05ebaefdde37cfc16d6842b8d600bf2cf4410f09
parent1264e9644fbe0ac441a38c79cc9ac895ecdd3bc3 (diff)
parent99316ec02c01a67996b3c21b8c2ec6d9cb5db714 (diff)
downloadnextcloud-server-7cdf6402ff9a0e07866ca8bcfcffd0e0897b646a.tar.gz
nextcloud-server-7cdf6402ff9a0e07866ca8bcfcffd0e0897b646a.zip
Merge pull request #472 from nextcloud/show-app-name-in-errormsg
Show app name in error message if app could not be loaded. (#25441)
-rw-r--r--lib/private/legacy/app.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/private/legacy/app.php b/lib/private/legacy/app.php
index 87553cca805..37ceea35ac0 100644
--- a/lib/private/legacy/app.php
+++ b/lib/private/legacy/app.php
@@ -1091,6 +1091,7 @@ class OC_App {
* @throws Exception if no app-name was specified
*/
public static function installApp($app) {
+ $appName = $app; // $app will be overwritten, preserve name for error logging
$l = \OC::$server->getL10N('core');
$config = \OC::$server->getConfig();
$ocsClient = new OCSClient(
@@ -1163,7 +1164,11 @@ class OC_App {
}
\OC_Hook::emit('OC_App', 'post_enable', array('app' => $app));
} else {
- throw new \Exception($l->t("No app name specified"));
+ if(empty($appName) ) {
+ throw new \Exception($l->t("No app name specified"));
+ } else {
+ throw new \Exception($l->t("App '%s' could not be installed!", $appName));
+ }
}
return $app;